Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nvmet: use NVME_NS_FEAT_OPTPERF_SHIFT

Use the NVME_NS_FEAT_OPTPERF_SHIFT constant in nvmet_bdev_set_limits()
to set the OPTPERF bits of the nvme_id_ns NSFEAT field instead of the
magic number 4.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>

authored by

Caleb Sander Mateos and committed by
Keith Busch
e0d56e70 1029298d

+2 -2
+2 -2
drivers/nvme/target/io-cmd-bdev.c
··· 30 30 id->nacwu = lpp0b; 31 31 32 32 /* 33 - * Bit 4 indicates that the fields NPWG, NPWA, NPDG, NPDA, and 33 + * OPTPERF = 01b indicates that the fields NPWG, NPWA, NPDG, NPDA, and 34 34 * NOWS are defined for this namespace and should be used by 35 35 * the host for I/O optimization. 36 36 */ 37 - id->nsfeat |= 1 << 4; 37 + id->nsfeat |= 0x1 << NVME_NS_FEAT_OPTPERF_SHIFT; 38 38 /* NPWG = Namespace Preferred Write Granularity. 0's based */ 39 39 id->npwg = to0based(bdev_io_min(bdev) / bdev_logical_block_size(bdev)); 40 40 /* NPWA = Namespace Preferred Write Alignment. 0's based */