]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: add lba to sect conversion helpers
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Tue, 12 Jan 2021 04:26:16 +0000 (20:26 -0800)
committerChristoph Hellwig <hch@lst.de>
Tue, 2 Feb 2021 09:26:11 +0000 (10:26 +0100)
commit67f74d70bb7ed436d29f449c65ccda0b871bc846
treee03131156e5412e1ac1db076e861fe2606d86083
parent56e4ddf37455c1d579fc26244ea85a3028778a8a
nvmet: add lba to sect conversion helpers

In this preparation patch, we add helpers to convert lbas to sectors &
sectors to lba. This is needed to eliminate code duplication in the ZBD
backend.

Use these helpers in the block device backend.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/io-cmd-bdev.c
drivers/nvme/target/nvmet.h