aboutsummaryrefslogtreecommitdiff
path: root/fs/exofs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@fusionio.com>2013-03-26 13:07:00 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-05 10:04:34 -0700
commit84519c0cb119e2a025dc6496440acedc855d9b21 (patch)
treeb01bbab183ce84a817b90fd59d7176fb5a7a0cfe /fs/exofs
parente18e8665134f6adb079861d3676e7d838ce658ca (diff)
Btrfs: fix race between mmap writes and compression
commit 4adaa611020fa6ac65b0ac8db78276af4ec04e63 upstream. Btrfs uses page_mkwrite to ensure stable pages during crc calculations and mmap workloads. We call clear_page_dirty_for_io before we do any crcs, and this forces any application with the file mapped to wait for the crc to finish before it is allowed to change the file. With compression on, the clear_page_dirty_for_io step is happening after we've compressed the pages. This means the applications might be changing the pages while we are compressing them, and some of those modifications might not hit the disk. This commit adds the clear_page_dirty_for_io before compression starts and makes sure to redirty the page if we have to fallback to uncompressed IO as well. Signed-off-by: Chris Mason <chris.mason@fusionio.com> Reported-by: Alexandre Oliva <oliva@gnu.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/exofs')
0 files changed, 0 insertions, 0 deletions