diff options
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r-- | include/linux/nvme.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index aa575033dbe7..09f419d4da4e 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@ -566,6 +566,11 @@ struct nvme_iod { struct scatterlist sg[0]; }; +static inline u64 nvme_block_nr(struct nvme_ns *ns, sector_t sector) +{ + return (sector >> (ns->lba_shift - 9)); +} + /** * nvme_free_iod - frees an nvme_iod * @dev: The device that the I/O was submitted to |