mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
nvme: submit internal commands through the block layer
Use block layer queues with an internal cmd_type to submit internally generated NVMe commands. This both simplifies the code a lot and allow for a better structure. For example now the LighNVM code can construct commands without knowing the details of the underlying I/O descriptors. Or a future NVMe over network target could inject commands, as well as could the SCSI translation and ioctl code be reused for such a beast. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
committed by
Jens Axboe
parent
772ce43559
commit
d29ec8241c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -146,21 +146,15 @@ 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
|
||||
* @iod: The memory to free
|
||||
*/
|
||||
void nvme_free_iod(struct nvme_dev *dev, struct nvme_iod *iod);
|
||||
|
||||
int nvme_setup_prps(struct nvme_dev *, struct nvme_iod *, int, gfp_t);
|
||||
struct nvme_iod *nvme_map_user_pages(struct nvme_dev *dev, int write,
|
||||
unsigned long addr, unsigned length);
|
||||
void nvme_unmap_user_pages(struct nvme_dev *dev, int write,
|
||||
struct nvme_iod *iod);
|
||||
int nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd);
|
||||
int nvme_identify(struct nvme_dev *, unsigned nsid, unsigned cns,
|
||||
dma_addr_t dma_addr);
|
||||
int nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
|
||||
void *buf, unsigned bufflen);
|
||||
int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
|
||||
void *buffer, void __user *ubuffer, unsigned bufflen,
|
||||
u32 *result, unsigned timeout);
|
||||
int nvme_identify_ctrl(struct nvme_dev *dev, struct nvme_id_ctrl **id);
|
||||
int nvme_identify_ns(struct nvme_dev *dev, unsigned nsid,
|
||||
struct nvme_id_ns **id);
|
||||
int nvme_get_log_page(struct nvme_dev *dev, struct nvme_smart_log **log);
|
||||
int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid,
|
||||
dma_addr_t dma_addr, u32 *result);
|
||||
int nvme_set_features(struct nvme_dev *dev, unsigned fid, unsigned dword11,
|
||||
|
||||
Reference in New Issue
Block a user