]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: scrub: use virtual addresses directly
authorChristoph Hellwig <hch@lst.de>
Wed, 9 Apr 2025 11:10:41 +0000 (13:10 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:47 +0000 (14:30 +0200)
commitadbfd189c4695862c464da87b3e574241452d73d
tree3f381aeab4e6cd8cbfe9e6a4cb6529591e4c4e37
parentcd678925e9f20e671fdb67a9e1d358ad445a8cc9
btrfs: scrub: use virtual addresses directly

Instead of the old @page and @page_offset pair inside scrub, here we can
directly use the virtual address for a sector.

This has the following benefit:

- Simplified parameters
  A single @kaddr will repair @page and @page_offset.

- No more unnecessary kmap/kunmap calls
  Since all pages utilized by scrub is allocated by scrub, and no
  highmem is allowed, we do not need to do any kmap/kunmap.

  And add an ASSERT() inside the new scrub_stripe_get_kaddr() to
  catch any unexpected highmem page.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Qu Wenruo <wqu@suse.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/scrub.c