From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs-progs: write_and_map_eb() cleanup
Date: Tue, 9 May 2023 19:48:37 +0800 [thread overview]
Message-ID: <cover.1683632614.git.wqu@suse.com> (raw)
During my convert fixes, I found a lot of locations allocating a dummy
extent buffer with a size which is not nodesize.
Then just read data into that dummy eb, and later call
write_and_map_eb() to write it back.
This behavior is a historic workaround, at a time where we only do
proper RAID56 writeback for metadata, but not data.
But now we have all raid56 handling done properly, and has proper
function to read/write any logical bytenr, read_data_from_disk() and
write_data_to_disk().
Thus there is no longer any need to use write_and_map_eb() as a
workaround.
This patchset would completely remove write_and_map_eb(), most call
sites are just abuse, only 3 call sites are valid but can easily be
converted to call write_data_to_disk().
Qu Wenruo (3):
btrfs-progs: split btrfs_direct_pio() functions into two
btrfs-progs: constify the buffer pointer for write functions
btrfs-progs: remove write_and_map_eb()
btrfs-corrupt-block.c | 48 ++++++++++++++---------
common/device-utils.c | 82 ++++++++++++++++++++++++++-------------
common/device-utils.h | 13 ++++---
convert/main.c | 19 ++++-----
convert/source-reiserfs.c | 10 +----
kernel-shared/disk-io.c | 23 +----------
kernel-shared/disk-io.h | 1 -
kernel-shared/extent_io.c | 2 +-
kernel-shared/extent_io.h | 2 +-
mkfs/rootdir.c | 41 +++++++-------------
10 files changed, 118 insertions(+), 123 deletions(-)
--
2.40.1
next reply other threads:[~2023-05-09 11:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 11:48 Qu Wenruo [this message]
2023-05-09 11:48 ` [PATCH 1/3] btrfs-progs: split btrfs_direct_pio() functions into two Qu Wenruo
2023-05-09 11:48 ` [PATCH 2/3] btrfs-progs: constify the buffer pointer for write functions Qu Wenruo
2023-05-09 11:48 ` [PATCH 3/3] btrfs-progs: remove write_and_map_eb() Qu Wenruo
2023-05-10 16:25 ` [PATCH 0/3] btrfs-progs: write_and_map_eb() cleanup 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.1683632614.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