]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: Flush with data support
authorKeith Busch <keith.busch@intel.com>
Tue, 29 Apr 2014 17:41:29 +0000 (11:41 -0600)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Mon, 5 May 2014 14:54:02 +0000 (10:54 -0400)
commitf04f2dd1b116d6f7eda024710a92934b74f9b838
tree7e070ef357ad00df7d971d5672711e17abda2232
parent3f18e39f19c3598b9a8fe90f26ce5517f94a2342
NVMe: Flush with data support

It is possible a filesystem may send a flush flagged bio with write
data. There is no such composite NVMe command, so the driver sends flush
and write separately.

The device is allowed to execute these commands in any order, so it was
possible the driver ends the bio after the write completes, but while the
flush is still active. We don't want to let a filesystem believe flush
succeeded before it really has; this could cause data corruption on a
power loss between these events. To fix, this patch splits the flush
and write into chained bios.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme-core.c
include/linux/nvme.h