Skip to content

Commit d830675

Browse files
authored
Merge pull request #307 from bjpaupor/lbstm
Add lbstm support for create-ns
2 parents cca9687 + f21bb58 commit d830675

4 files changed

Lines changed: 3 additions & 32 deletions

File tree

src/libnvme.map

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ LIBNVME_1_0 {
175175
nvme_init_ctrl_list;
176176
nvme_init_dsm_range;
177177
nvme_init_logging;
178-
nvme_init_id_ns;
179178
nvme_io;
180179
nvme_io_passthru64;
181180
nvme_io_passthru;

src/nvme/types.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1706,6 +1706,7 @@ enum nvme_lbaf_rp {
17061706
* remains fixed throughout the life of the namespace and is
17071707
* preserved across namespace and controller operations
17081708
* @lbaf: LBA Format, see &struct nvme_lbaf.
1709+
* @lbstm: Logical Block Storage Tag Mask for end-to-end protection
17091710
* @vs: Vendor Specific
17101711
*/
17111712
struct nvme_id_ns {
@@ -1749,7 +1750,8 @@ struct nvme_id_ns {
17491750
__u8 nguid[16];
17501751
__u8 eui64[8];
17511752
struct nvme_lbaf lbaf[64];
1752-
__u8 vs[3712];
1753+
__le64 lbstm;
1754+
__u8 vs[3704];
17531755
};
17541756

17551757
/**

src/nvme/util.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -401,19 +401,6 @@ void nvme_init_dsm_range(struct nvme_dsm_range *dsm, __u32 *ctx_attrs,
401401
}
402402
}
403403

404-
void nvme_init_id_ns(struct nvme_id_ns *ns, __u64 nsze, __u64 ncap, __u8 flbas,
405-
__u8 dps, __u8 nmic, __u32 anagrpid, __u16 nvmsetid)
406-
{
407-
memset(ns, 0, sizeof(*ns));
408-
ns->nsze = cpu_to_le64(nsze);
409-
ns->ncap = cpu_to_le64(ncap);
410-
ns->flbas = flbas;
411-
ns->dps = dps;
412-
ns->nmic = nmic;
413-
ns->anagrpid = cpu_to_le32(anagrpid);
414-
ns->nvmsetid = cpu_to_le16(nvmsetid);
415-
}
416-
417404
void nvme_init_ctrl_list(struct nvme_ctrl_list *cntlist, __u16 num_ctrls,
418405
__u16 *ctrlist)
419406
{

src/nvme/util.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,6 @@ const char *nvme_status_to_string(int status, bool fabrics);
7575
*/
7676
const char *nvme_errno_to_string(int err);
7777

78-
/**
79-
* nvme_init_id_ns() - Initialize an Identify Namepsace structure for creation.
80-
* @ns: Address of the Identify Namespace structure to initialize
81-
* @nsze: Namespace size
82-
* @ncap: namespace capacity
83-
* @flbas: formatted logical block size settings
84-
* @dps: Data protection settings
85-
* @nmic: Namespace sharing capabilities
86-
* @anagrpid: ANA group identifier
87-
* @nvmsetid: NVM Set identifer
88-
*
89-
* This is intended to be used with a namespace management "create", see
90-
* nvme_ns_mgmt_create().
91-
*/
92-
void nvme_init_id_ns(struct nvme_id_ns *ns, __u64 nsze, __u64 ncap, __u8 flbas,
93-
__u8 dps, __u8 nmic, __u32 anagrpid, __u16 nvmsetid);
94-
9578
/**
9679
* nvme_init_ctrl_list() - Initialize an nvme_ctrl_list structure from an array.
9780
* @cntlist: The controller list structure to initialize

0 commit comments

Comments
 (0)