From: Filipe Manana <fdman...@suse.com>

The following patchset fixes 2 bugs with the swapfile support, where we can
end up falling back to COW when writing to an active swapfile. As a bonus,
it makes the NOCOW write patch, for both buffered and direct IO, more efficient
by avoiding doing repeated worked when checking if the target block group is
read-only.

Filipe Manana (4):
  btrfs: avoid checking for RO block group twice during nocow writeback
  btrfs: fix race between writes to swap files and scrub
  btrfs: remove no longer used function btrfs_extent_readonly()
  btrfs: fix race between swap file activation and snapshot creation

 fs/btrfs/block-group.c | 33 ++++++++++++++++++++++++++++-
 fs/btrfs/block-group.h |  9 ++++++++
 fs/btrfs/ctree.h       |  6 +++++-
 fs/btrfs/extent-tree.c | 13 ------------
 fs/btrfs/inode.c       | 47 ++++++++++++++++++++++++++++++++++--------
 fs/btrfs/scrub.c       |  9 +++++++-
 6 files changed, 92 insertions(+), 25 deletions(-)

-- 
2.28.0

Reply via email to