> > + > > + if (is_vmalloc && op == REQ_OP_READ) > > + flush_kernel_vmap_range(data, count); > > That should be REQ_OP_WRITE. i.e. the data the CPU has written to > the aliased vmap address has to be flushed back to the physical page > before the DMA from the physical page to the storage device occurs. Actually it probably should be unconditional, so that we have a clean cache to start with. That also matches what xfs_buf.c does. > > + if (is_vmalloc && op == REQ_OP_WRITE) > > + invalidate_kernel_vmap_range(data, count); > > And this should be REQ_OP_READ - to invalidate anything aliased in > the CPU cache before the higher layers try to read the new data in > the physical page... Fixed.