discard cmd through ioctl

Keith Busch keith.busch at intel.com
Fri Feb 6 12:02:42 PST 2015


On Fri, 6 Feb 2015, sheng qiu wrote:
> Hi,
>
> May i ask is there a way to issue data set management cmd from
> application to achieve discard function with current NVMe driver?
>
> i see there are regular IO or Admin interface for ioctl at driver
> side. Is this also applicable to dsm cmd?

Sure, you can use the NVME_IOCTL_IO_CMD to submit any arbitary IO command
you like.

It would probably be easier to use sg_unmap or blkdiscard to achieve the
same thing unless you require using the DSM command's other attributes
in addition to deallocate.

> Thanks,
> Sheng



More information about the Linux-nvme mailing list