summaryrefslogtreecommitdiff
path: root/drivers/md/dm-region-hash.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2011-08-02 15:32:01 +0400
committerAlasdair G Kergon <agk@redhat.com>2011-08-02 15:32:01 +0400
commitbb91bc7bacb906c9f3a9b22744c53fa7564b51ba (patch)
tree8acd6ee46ab5a557afcd1c491b55a68830252301 /drivers/md/dm-region-hash.c
parent286f367dad40beb3234a18c17391d03ba939a7f3 (diff)
downloadlinux-bb91bc7bacb906c9f3a9b22744c53fa7564b51ba.tar.xz
dm io: flush cpu cache with vmapped io
For normal kernel pages, CPU cache is synchronized by the dma layer. However, this is not done for pages allocated with vmalloc. If we do I/O to/from vmallocated pages, we must synchronize CPU cache explicitly. Prior to doing I/O on vmallocated page we must call flush_kernel_vmap_range to flush dirty cache on the virtual address. After finished read we must call invalidate_kernel_vmap_range to invalidate cache on the virtual address, so that accesses to the virtual address return newly read data and not stale data from CPU cache. This patch fixes metadata corruption on dm-snapshots on PA-RISC and possibly other architectures with caches indexed by virtual address. Cc: stable <stable@kernel.org> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-region-hash.c')
0 files changed, 0 insertions, 0 deletions