]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nvme: add preferred I/O size fields to struct nvme_id_ns_nvm
authorCaleb Sander Mateos <csander@purestorage.com>
Fri, 27 Feb 2026 20:23:46 +0000 (13:23 -0700)
committerKeith Busch <kbusch@kernel.org>
Fri, 27 Mar 2026 14:35:03 +0000 (07:35 -0700)
A subsequent change will use the NPDGL and NPDAL fields of the NVM
Command Set Specific Identify Namespace structure, so add them (and the
handful of intervening fields) to struct nvme_id_ns_nvm. Add an
assertion that the size is still 4 KB.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
include/linux/nvme.h

index edfebbce6745338eb938166b50502a861f358a99..ec011dce4a9767134465fd83111b578a45a125e8 100644 (file)
@@ -513,9 +513,16 @@ struct nvme_id_ns_nvm {
        __u8    pic;
        __u8    rsvd9[3];
        __le32  elbaf[64];
-       __u8    rsvd268[3828];
+       __le32  npdgl;
+       __le32  nprg;
+       __le32  npra;
+       __le32  nors;
+       __le32  npdal;
+       __u8    rsvd288[3808];
 };
 
+static_assert(sizeof(struct nvme_id_ns_nvm) == 4096);
+
 enum {
        NVME_ID_NS_NVM_STS_MASK         = 0x7f,
        NVME_ID_NS_NVM_GUARD_SHIFT      = 7,