diff options
| author | Filipe Manana <[email protected]> | 2014-09-08 21:53:18 +0000 |
|---|---|---|
| committer | Chris Mason <[email protected]> | 2014-09-17 20:38:27 +0000 |
| commit | a2cc11db245b9d8fbd4e3adbe2a1e7cf60473950 (patch) | |
| tree | 62b241117f154e57cd337de4d08c2a54767df099 /fs/btrfs/dev-replace.c | |
| parent | Btrfs: fix loop writing of async reclaim (diff) | |
| download | kernel-a2cc11db245b9d8fbd4e3adbe2a1e7cf60473950.tar.gz kernel-a2cc11db245b9d8fbd4e3adbe2a1e7cf60473950.zip | |
Btrfs: fix directory recovery from fsync log
When replaying a directory from the fsync log, if a directory entry
exists both in the fs/subvol tree and in the log, the directory's inode
got its i_size updated incorrectly, accounting for the dentry's name
twice.
Reproducer, from a test for xfstests:
_scratch_mkfs >> $seqres.full 2>&1
_init_flakey
_mount_flakey
touch $SCRATCH_MNT/foo
sync
touch $SCRATCH_MNT/bar
xfs_io -c "fsync" $SCRATCH_MNT
xfs_io -c "fsync" $SCRATCH_MNT/bar
_load_flakey_table $FLAKEY_DROP_WRITES
_unmount_flakey
_load_flakey_table $FLAKEY_ALLOW_WRITES
_mount_flakey
[ -f $SCRATCH_MNT/foo ] || echo "file foo is missing"
[ -f $SCRATCH_MNT/bar ] || echo "file bar is missing"
_unmount_flakey
_check_scratch_fs $FLAKEY_DEV
The filesystem check at the end failed with the message:
"root 5 root dir 256 error".
A test case for xfstests follows.
Signed-off-by: Filipe Manana <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
