mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
nvme: remove virtual boundary for sgl capable devices
The nvme virtual boundary is only required for the PRP format. Devices that can use SGL for DMA don't need it for IO queues. Drop reporting it for such devices; rdma fabrics controllers will continue to use the limit as they currently don't report any boundary requirements, but tcp and fc never needed it in the first place so they get to report no virtual boundary. Applications may continue to align to the same virtual boundaries for optimization purposes if they want, and the driver will continue to decide whether to use the PRP format the same as before if the IO allows it. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -558,6 +558,12 @@ static inline bool nvme_ns_has_pi(struct nvme_ns_head *head)
|
||||
return head->pi_type && head->ms == head->pi_size;
|
||||
}
|
||||
|
||||
static inline unsigned long nvme_get_virt_boundary(struct nvme_ctrl *ctrl,
|
||||
bool is_admin)
|
||||
{
|
||||
return NVME_CTRL_PAGE_SIZE - 1;
|
||||
}
|
||||
|
||||
struct nvme_ctrl_ops {
|
||||
const char *name;
|
||||
struct module *module;
|
||||
@@ -578,6 +584,7 @@ struct nvme_ctrl_ops {
|
||||
int (*get_address)(struct nvme_ctrl *ctrl, char *buf, int size);
|
||||
void (*print_device_info)(struct nvme_ctrl *ctrl);
|
||||
bool (*supports_pci_p2pdma)(struct nvme_ctrl *ctrl);
|
||||
unsigned long (*get_virt_boundary)(struct nvme_ctrl *ctrl, bool is_admin);
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user