]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix missing flush when committing a transaction
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 1 Nov 2012 07:33:14 +0000 (07:33 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 12 Dec 2012 22:15:21 +0000 (17:15 -0500)
commitd29a7d29a32e393b1f39c69f3c0974e8bb4718a4
treea6799d2d2f1b624bca121c0bd3d019d6794bdc03
parent1f6f23a4556373c5dc937628d75e8de1b0683b37
Btrfs: fix missing flush when committing a transaction

Consider the following case:
Task1 Task2
start_transaction
commit_transaction
  check pending snapshots list and the
  list is empty.
add pending snapshot into list
  skip the delalloc flush
end_transaction
  ...

And then the problem that the snapshot is different with the source subvolume
happen.

This patch fixes the above problem by flush all pending stuffs when all the
other tasks end the transaction.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/transaction.c