From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/2] btrfs: unify the read and writer locks for btrfs_subpage
Date: Wed, 9 Oct 2024 16:21:05 +1030 [thread overview]
Message-ID: <cover.1728452897.git.wqu@suse.com> (raw)
[CHANGELOG]
v2:
- Rename btrfs_subpage::locked to btrfs_subpage::nr_locked
When the handling of sector size < page size is introduced, there are
two types of locking, reader and writer lock.
The main reason for the reader lock is to handle metadata to make sure
the page::private is not released when there is still a metadata being
read.
However since commit d7172f52e993 ("btrfs: use per-buffer locking for
extent_buffer reading"), metadata read no longer relies on
btrfs_subpage::readers.
Making the writer lock as the only utilized subpage locking.
This patchset converts all the existing reader lock usage and rename the
writer lock into a generic lock.
This patchset relies on this patch "btrfs: fix the delalloc range
locking if sector size < page size", as it removes the last user of
btrfs_folio_start_writer_lock().
Qu Wenruo (2):
btrfs: unify to use writer locks for subpage locking
btrfs: rename btrfs_folio_(set|start|end)_writer_lock()
fs/btrfs/compression.c | 3 +-
fs/btrfs/extent_io.c | 20 +++-----
fs/btrfs/subpage.c | 108 ++++++++++-------------------------------
fs/btrfs/subpage.h | 33 +++++--------
4 files changed, 45 insertions(+), 119 deletions(-)
--
2.46.2
next reply other threads:[~2024-10-09 5:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 5:51 Qu Wenruo [this message]
2024-10-09 5:51 ` [PATCH v2 1/2] btrfs: unify to use writer locks for subpage locking Qu Wenruo
2024-10-09 5:51 ` [PATCH v2 2/2] btrfs: rename btrfs_folio_(set|start|end)_writer_lock() Qu Wenruo
2024-10-16 15:28 ` [PATCH v2 0/2] btrfs: unify the read and writer locks for btrfs_subpage David Sterba
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.1728452897.git.wqu@suse.com \
--to=wqu@suse.com \
--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).