aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2013-12-27 21:11:50 +0800
committerChris Mason <clm@fb.com>2014-01-28 13:20:13 -0800
commite77751aad1facc4973613a11e2ad98ee4bbb04e1 (patch)
tree45d1dc9b9731bc047289c26671d1cfcd0b1a6fe4 /fs/btrfs/relocation.c
parentBtrfs: fix an oops when we fail to merge reloc roots (diff)
downloadlinux-dev-e77751aad1facc4973613a11e2ad98ee4bbb04e1.tar.xz
linux-dev-e77751aad1facc4973613a11e2ad98ee4bbb04e1.zip
Btrfs: fix the wrong nocow range check
The following warning message was outputed when running the 274th case of xfstests with nodatacow option: BUG: Bad page state in process kswapd0 pfn:1c66f page:ffffea0000636848 count:0 mapcount:0 mapping:(null) index:0x78000 page flags: 0x1000000000100a(error|uptodate|private_2) It is because the check of nocow range was wrong, we should compare the start and end position of the extent with the write position to verify if the write position was in the extent, but the current code just used the start postion to do the check, so we got the wrong extent and told the caller that it was a nocow write. And then when we write back the dirty pages, we found we should cow the extent, but at that time, there was no space in the fs, we had to the error flag for the page. When someone reclaimed that page, the above warning outputed. Fix it. Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
0 files changed, 0 insertions, 0 deletions