summaryrefslogtreecommitdiffstats
path: root/fs/file_table.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2011-10-10 21:43:34 +0200
committerChris Mason <chris.mason@oracle.com>2011-10-10 21:43:34 +0200
commit2a0f7f5769992bae5b3f97157fd80b2b943be485 (patch)
treeee19a5470211f13d1e53a311cb0d9e2ccc2988fc /fs/file_table.c
parentBtrfs: force a page fault if we have a shorty copy on a page boundary (diff)
downloadlinux-2a0f7f5769992bae5b3f97157fd80b2b943be485.tar.xz
linux-2a0f7f5769992bae5b3f97157fd80b2b943be485.zip
Btrfs: fix recursive auto-defrag
Follow those steps: # mount -o autodefrag /dev/sda7 /mnt # dd if=/dev/urandom of=/mnt/tmp bs=200K count=1 # sync # dd if=/dev/urandom of=/mnt/tmp bs=8K count=1 conv=notrunc and then it'll go into a loop: writeback -> defrag -> writeback ... It's because writeback writes [8K, 200K] and then writes [0, 8K]. I tried to make writeback know if the pages are dirtied by defrag, but the patch was a bit intrusive. Here I simply set writeback_index when we defrag a file. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/file_table.c')
0 files changed, 0 insertions, 0 deletions