]> git.baikalelectronics.ru Git - kernel.git/commit
dm writecache: handle DAX to partitions on persistent memory correctly
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 24 Aug 2020 15:09:47 +0000 (11:09 -0400)
committerMike Snitzer <snitzer@redhat.com>
Tue, 1 Sep 2020 20:41:55 +0000 (16:41 -0400)
commitf15ad228a615857e8b980373a5fbf63f0a4a0bd1
treeba83029d03adc0f497d2330e1e73b1693874f007
parentbeea5f8bd9170d3d0e6476d33bde88d795ce40b0
dm writecache: handle DAX to partitions on persistent memory correctly

The function dax_direct_access doesn't take partitions into account,
it always maps pages from the beginning of the device. Therefore,
persistent_memory_claim() must get the partition offset using
get_start_sect() and add it to the page offsets passed to
dax_direct_access().

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: 27be8d954730 ("dm: add writecache target")
Cc: stable@vger.kernel.org # 4.18+
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-writecache.c