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
