aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/async-thread.h
diff options
context:
space:
mode:
authorMiao Xie <[email protected]>2014-02-27 05:58:05 +0000
committerJosef Bacik <[email protected]>2014-03-10 19:17:00 +0000
commit7b2b70851f862b68714f357d2926adbb6c574fdd (patch)
treeb1f0715cb4140c4ddd63bf3c6e70f1900c8b9acf /fs/btrfs/async-thread.h
parentBtrfs: fix wrong lock range and write size in check_can_nocow() (diff)
downloadkernel-7b2b70851f862b68714f357d2926adbb6c574fdd.tar.gz
kernel-7b2b70851f862b68714f357d2926adbb6c574fdd.zip
Btrfs: fix preallocate vs double nocow write
We can not release the reserved metadata space for the first write if we find the write position is pre-allocated. Because the kernel might write the data on the disk before we do the second write but after the can-nocow check, if we release the space for the first write, we might fail to update the metadata because of no space. Fix this problem by end nocow write if there is dirty data in the range whose space is pre-allocated. Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Josef Bacik <[email protected]>
Diffstat (limited to 'fs/btrfs/async-thread.h')
0 files changed, 0 insertions, 0 deletions