]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: introduce read_extent_buffer_subpage()
authorQu Wenruo <wqu@suse.com>
Tue, 26 Jan 2021 08:33:57 +0000 (16:33 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Feb 2021 21:59:03 +0000 (22:59 +0100)
commitfba8713fc84fa185f33f65ef6c9c67048994bcf6
tree72201e7ef25a4ccf6aa94b00e9e5f300836bd27a
parent2213cf811beef721e2ce7731515a7d1a1517cf7f
btrfs: introduce read_extent_buffer_subpage()

Introduce a helper, read_extent_buffer_subpage(), to do the subpage
extent buffer read.

The difference between regular and subpage routines are:

- No page locking
  Here we completely rely on extent locking.
  Page locking can reduce the concurrency greatly, as if we lock one
  page to read one extent buffer, all the other extent buffers in the
  same page will have to wait.

- Extent uptodate condition
  Despite the existing PageUptodate() and EXTENT_BUFFER_UPTODATE check,
  We also need to check btrfs_subpage::uptodate_bitmap.

- No page iteration
  Just one page, no need to loop, this greatly simplified the subpage
  routine.

This patch only implements the bio submit part, no endio support yet.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c