From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
To: David Sterba <dsterba@suse.cz>
Cc: Nikolay Borisov <nborisov@suse.com>,
Josef Bacik <josef@toxicpanda.com>,
"linux-btrfs @ vger . kernel . org" <linux-btrfs@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: [PATCH v8 0/8] btrfs: remove buffer heads form superblock handling
Date: Fri, 14 Feb 2020 00:24:28 +0900 [thread overview]
Message-ID: <20200213152436.13276-1-johannes.thumshirn@wdc.com> (raw)
This patch series removes the use of buffer_heads from btrfs' super block read
and write paths. It also converts the integrity-checking code to only work
with pages and BIOs.
Compared to buffer heads, this gives us a leaner call path, as the
buffer_head code wraps around getting pages from the page-cache and adding
them to BIOs to submit.
Patches one to three are preparatory patches, the first one exports
btrfs_release_disk_super() as a commomn helper to release pages containig a
super block, the second removes the kmap() calls from block device mappings as
suggested by Christoph. The third one unexports btrfs_scratch_superblocks()
The fourth patch removes buffer_heads from superblock reading. The fifth
removes it from super_block writing and the subsequent patches remove the
buffer_heads from the integrity check code.
Due to a rebase error patch #3 of v5 got merged into the patch removing the
BHs form super-block reading, but in the end it isn't too bad this way either.
It's based on misc-next from Monday February 11
(23ba1a90f0571d91b55bdfef7f06f380a74e8475), and doesn't show any regressions
in xfstests to the baseline.
Changes to v7:
- Remove forward declaration for btrfs_scratch_superblocks() (Nikolay)
- Fix kmap()/kunmap() in check-integrity.c (David)
- Fix subject of patch 2 (hch)
Changes to v6:
- Fixed build warning about unused result of write_one_page() (David)
- Unexport btrfs_scratch_superblocks()
Changes to v5:
- Rebase to newer misc-next
- Merge old patches 2 and 3
- Remove kmap()s of pages from block devices (both in new code as well as
existing code)
Changes to v4:
- Ressurected Nikolay's patch exporting btrfs_release_disk_super()
- Incroporated feedback from Christoph
Changes to v3:
- Incroporated feedback from Christoph
Changes to v2:
- Removed patch #1 again
- Added Reviews from Josef
- Re-visited page locking, but not changes, it retains the same locking scheme
the buffer_heads had
- Incroptorated comments from David regarding open-coding functions
- For more details see the idividual patches.
Changes to v1:
- Added patch #1
- Converted sb reading and integrity checking to use the page cache
- Added rationale behind the conversion to the commit messages.
- For more details see the idividual patches.
Johannes Thumshirn (7):
btrfs: don't kmap() pages from block devices
btrfs: reduce scope of btrfs_scratch_superblocks()
btrfs: use the page-cache for super block reading
btrfs: use BIOs instead of buffer_heads from superblock writeout
btrfs: remove btrfsic_submit_bh()
btrfs: remove buffer_heads from btrfsic_process_written_block()
btrfs: remove buffer_heads form superblock mirror integrity checking
Nikolay Borisov (1):
btrfs: Export btrfs_release_disk_super
fs/btrfs/check-integrity.c | 202 +++++++++----------------------------
fs/btrfs/check-integrity.h | 2 -
fs/btrfs/disk-io.c | 191 ++++++++++++++++++-----------------
fs/btrfs/disk-io.h | 6 +-
fs/btrfs/volumes.c | 125 ++++++++++++-----------
fs/btrfs/volumes.h | 4 +-
6 files changed, 217 insertions(+), 313 deletions(-)
--
2.24.1
next reply other threads:[~2020-02-13 16:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-13 15:24 Johannes Thumshirn [this message]
2020-02-13 15:24 ` [PATCH v8 1/8] btrfs: Export btrfs_release_disk_super Johannes Thumshirn
2020-02-13 15:24 ` [PATCH v8 2/8] btrfs: don't kmap() pages from block devices Johannes Thumshirn
2020-02-13 15:24 ` [PATCH v8 3/8] btrfs: reduce scope of btrfs_scratch_superblocks() Johannes Thumshirn
2020-02-18 3:14 ` Anand Jain
2020-02-13 15:24 ` [PATCH v8 4/8] btrfs: use the page-cache for super block reading Johannes Thumshirn
2020-02-14 13:59 ` David Sterba
2020-02-13 15:24 ` [PATCH v8 5/8] btrfs: use BIOs instead of buffer_heads from superblock writeout Johannes Thumshirn
2020-02-14 15:02 ` David Sterba
2020-02-14 15:08 ` David Sterba
2020-02-14 15:15 ` Johannes Thumshirn
2020-02-18 9:28 ` Anand Jain
2020-02-13 15:24 ` [PATCH v8 6/8] btrfs: remove btrfsic_submit_bh() Johannes Thumshirn
2020-02-18 9:30 ` Anand Jain
2020-02-13 15:24 ` [PATCH v8 7/8] btrfs: remove buffer_heads from btrfsic_process_written_block() Johannes Thumshirn
2020-02-13 15:24 ` [PATCH v8 8/8] btrfs: remove buffer_heads form superblock mirror integrity checking Johannes Thumshirn
2020-02-14 13:53 ` David Sterba
2020-02-14 15:43 ` David Sterba
2020-02-20 15:56 ` [PATCH v8 0/8] btrfs: remove buffer heads form superblock handling 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=20200213152436.13276-1-johannes.thumshirn@wdc.com \
--to=johannes.thumshirn@wdc.com \
--cc=dsterba@suse.cz \
--cc=hch@lst.de \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
/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).