[PATCH v3 1/1] nvme : Add ioctl to query nvme attributes
Chaitanya Kulkarni
chaitanyak at nvidia.com
Fri Nov 18 16:04:43 PST 2022
On 11/18/22 14:35, Keith Busch wrote:
> On Thu, Nov 17, 2022 at 03:13:37PM +0100, Joel Granados wrote:
>> +#define NVME_IOCTL_GET_ATTR _IOWR('N', 0x50, struct nvme_get_attr)
>
> Isn't the ioctl's number derived from the sizeof the parameter? IOW, if
> you add new fields to the struct in the future, the ioctl number will
> change, breaking older applications that were using it. I don't think we
> want to keep adding new ioctl's to support legacy users, so probably
> padding that struct with plenty of reserved space is the way to go.
This is exactly I've asked explicitly to make the size of the structure
close to nvme command size (or even better to nvme identify controller
data structure size) so it will be future proof and we can add new
parameters.
Instead the rsvd field seems to be removed in this patch.
-ck
More information about the Linux-nvme
mailing list