-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
None
-
Affects Version/s: None
-
3
-
9223372036854775807
Deleting the stale mirror of a file right after a buffered write, with no sync in between, can leave the file reading back as zeros. The size is kept, and the zeros are on disk: they are still there after echo 3 > /proc/sys/vm/drop_caches.
Reproducer, as root on a single-node llmount.sh setup (one MDT, two OSTs, ldiskfs):
f=/mnt/lustre/zr/f head -c 2M /dev/urandom > /tmp/src lfs mirror create -N2 $f dd if=/tmp/src of=$f bs=1M conv=notrunc status=none # buffered; mirror 2 goes stale lfs mirror delete --mirror-id 2 $f # no sync before it cmp /tmp/src $f
Results on master 834440df45 (2.17.61_259), modules and lfs from the same build:
no sync: 6 of 10 files read back as all zeros (2 MiB, size kept) sync before: 0 of 5 after drop_caches the zero files are still all zeros
It also happened with 2.17.60_127 modules and 2.17.60_134 lfs (10 of 10). lfs mirror delete returns 0, and the file keeps mirror 1, the one that was in sync.
It looks like the dirty pages of the write are dropped, not flushed, when the layout changes at the split (LL_LEASE_LAYOUT_SPLIT on lease release). The delete does not fail or warn.
On this MDS, lfs mirror delete first gets -EINVAL for the file itself as the victim (LU-21152) and then splits into a volatile file. I have not checked whether the volatile path matters.
- is related to
-
LU-21152 FLR: mirror delete with the file itself as the victim fails with -EINVAL
-
- Open
-