From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/3] btrfs: fix a couple swapfile support bugs
Date: Fri, 5 Feb 2021 12:55:35 +0000 [thread overview]
Message-ID: <cover.1612529182.git.fdmanana@suse.com> (raw)
In-Reply-To: <cover.1612350698.git.fdmanana@suse.com>
From: Filipe Manana <fdmanana@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. The first patch
is actually independent and just makes the nocow buffered IO path more efficient
by eliminating a repeated check for a read-only block group.
V2: Removed the part of optimizing the direct IO nocow path from patch 2,
because removing the RO block group check from can_nocow_extent() would
leave the buffered write path that checks if we can fallback to nocow at
write time (and not writeback time), after hitting ENOSPC when attempting
to reserve data space, from doing that check. The optimization can still
be done, but that would require adding more context information to
can_nocow_extent(), so it could know when it needs to check if the block
group is RO or not - since things are a bit entangled around that function
and its callers, I've left it out for now.
Filipe Manana (3):
btrfs: avoid checking for RO block group twice during nocow writeback
btrfs: fix race between writes to swap files and scrub
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 | 5 +++++
fs/btrfs/inode.c | 44 ++++++++++++++++++++++++++++++++++++------
fs/btrfs/scrub.c | 9 ++++++++-
5 files changed, 92 insertions(+), 8 deletions(-)
--
2.28.0
next prev parent reply other threads:[~2021-02-05 22:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 11:17 [PATCH 0/4] btrfs: fix a couple swapfile support bugs fdmanana
2021-02-03 11:17 ` [PATCH 1/4] btrfs: avoid checking for RO block group twice during nocow writeback fdmanana
2021-02-04 7:47 ` Anand Jain
2021-02-03 11:17 ` [PATCH 2/4] btrfs: fix race between writes to swap files and scrub fdmanana
2021-02-04 8:48 ` Anand Jain
2021-02-04 10:11 ` Filipe Manana
2021-02-05 7:44 ` Anand Jain
2021-02-05 12:54 ` Filipe Manana
2021-02-03 11:17 ` [PATCH 3/4] btrfs: remove no longer used function btrfs_extent_readonly() fdmanana
2021-02-03 11:17 ` [PATCH 4/4] btrfs: fix race between swap file activation and snapshot creation fdmanana
2021-02-05 12:55 ` fdmanana [this message]
2021-02-05 12:55 ` [PATCH v2 1/3] btrfs: avoid checking for RO block group twice during nocow writeback fdmanana
2021-02-10 12:28 ` Anand Jain
2021-02-05 12:55 ` [PATCH v2 2/3] btrfs: fix race between writes to swap files and scrub fdmanana
2021-02-10 16:54 ` Anand Jain
2021-02-05 12:55 ` [PATCH v2 3/3] btrfs: fix race between swap file activation and snapshot creation fdmanana
2021-02-10 17:19 ` Anand Jain
2021-02-10 22:15 ` [PATCH v2 0/3] btrfs: fix a couple swapfile support bugs David Sterba
2021-02-10 15:30 ` [PATCH 0/4] " Josef Bacik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1612529182.git.fdmanana@suse.com \
--to=fdmanana@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).