]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: raid56: convert kmaps to kmap_local_page
authorIra Weiny <ira.weiny@intel.com>
Wed, 17 Feb 2021 02:48:24 +0000 (18:48 -0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 6 Apr 2021 13:35:55 +0000 (15:35 +0200)
commit089d535bfedf8b6f6af80637266313f3c6b32ac8
treec38a2980d53c3a2477969541edffb0876bb50191
parent2c86fe22b41edea15ade7d2b456bfd98b870b70d
btrfs: raid56: convert kmaps to kmap_local_page

These kmaps are thread local and don't need to be atomic.  So they can use
the more efficient kmap_local_page().  However, the mapping of pages in
the stripes and the additional parity and qstripe pages are a bit
trickier because the unmapping must occur in the opposite order from the
mapping.  Furthermore, the pointer array in __raid_recover_end_io() may
get reordered.

Convert these calls to kmap_local_page() taking care to reverse the
unmappings of any page arrays as well as being careful with the mappings
of any special pages such as the parity and qstripe pages.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c