OSDN Git Service

nvmet: add simple file backed ns support
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Wed, 23 May 2018 04:34:39 +0000 (00:34 -0400)
committerChristoph Hellwig <hch@lst.de>
Fri, 25 May 2018 14:50:12 +0000 (16:50 +0200)
commitd5eff33ee6f80864d889d64fd3f6ea7b78dd1b24
treec1fde2a87945df698f3a7bed7be6f76d11276e10
parent618cff4285dc0ef6ebb99f715116e7af62565293
nvmet: add simple file backed ns support

This patch adds simple file backed namespace support for NVMeOF target.

The new file io-cmd-file.c is responsible for handling the code for I/O
commands when ns is file backed. Also, we introduce mempools based slow
path using sync I/Os for file backed ns to ensure forward progress under
reclaim.

The old block device based implementation is moved to io-cmd-bdev.c and
use a "nvmet_bdev_" symbol prefix.  The enable/disable calls are also
move into the respective files.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
[hch: updated changelog, fixed double req->ns lookup in bdev case]
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/Makefile
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/core.c
drivers/nvme/target/io-cmd-bdev.c [moved from drivers/nvme/target/io-cmd.c with 76% similarity]
drivers/nvme/target/io-cmd-file.c [new file with mode: 0644]
drivers/nvme/target/nvmet.h