nvmet: add buffered I/O support for file backed ns
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Wed, 20 Jun 2018 04:01:41 +0000 (00:01 -0400)
committerChristoph Hellwig <hch@lst.de>
Mon, 23 Jul 2018 07:35:14 +0000 (09:35 +0200)
commit55eb942eda2ccbbbea61db4c1a774ba22b618046
treecfeeeaadeaf87b88e73a6bdf2ec878fc846b8b11
parent0866bf0c3778661e65f68a5c93df8e0a1e9e43cc
nvmet: add buffered I/O support for file backed ns

Add a new "buffered_io" attribute, which disabled direct I/O and thus
enables page cache based caching when enabled.   The attribute can only
be changed when the namespace is disabled as the file has to be reopend
for the change to take effect.

The possibly blocking read/write are deferred to a newly introduced
global workqueue.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/configfs.c
drivers/nvme/target/core.c
drivers/nvme/target/io-cmd-file.c
drivers/nvme/target/nvmet.h