nvmet: allow bdev in buffered_io mode
authorChaitanya Kulkarni <kch@nvidia.com>
Wed, 2 Feb 2022 09:04:45 +0000 (01:04 -0800)
committerChristoph Hellwig <hch@lst.de>
Mon, 28 Feb 2022 11:45:05 +0000 (13:45 +0200)
commit6f6d604b4ef896793901f213db3b45eefa7288fa
tree20556d98e7d5f4ff4808366aee4c15f4056f5785
parent2caecd62ea5160803b25d96cb1a14ce755c2c259
nvmet: allow bdev in buffered_io mode

Allow block device to be configured in the buffered I/O mode by using
the file backend. In this way now we can use cache for the block
device namespace which shows significant performance improvement.

We update the block device ns enable function and return early when
buffered_io flag is set.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/io-cmd-bdev.c