diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2011-08-02 12:32:01 +0100 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-10-28 11:16:50 +0200 |
commit | 809a5aaf90d6468f67380f4e762b32495a524dcb (patch) | |
tree | 551a7ca33d5106ca38d0a459b12e2a6d000e84cb /arch/m68k/sun3/intersil.c | |
parent | 11a56ca8ae0fa9e1c38f4a6b7798778b2f974dc1 (diff) |
dm io: flush cpu cache with vmapped io
commit bb91bc7bacb906c9f3a9b22744c53fa7564b51ba upstream.
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.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Change-Id: I84af92c869c7d04c2d9bef967a1ecbe7ff0c7002
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35677
Tested-by: Per VAHLNE <per.xx.vahlne@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'arch/m68k/sun3/intersil.c')
0 files changed, 0 insertions, 0 deletions