Skip to content

Commit d166d07

Browse files
dwsuseigaw
authored andcommitted
Revert "ioctl: add nvme_set_features_host_id2()"
This reverts commit 0782b38. The result field is undefined for many commands and thus can have random values. Thus we can't blindly evaluate these for all commands. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 1826dc7 commit d166d07

3 files changed

Lines changed: 1 addition & 28 deletions

File tree

src/libnvme.map

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ LIBNVME_1.9 {
1212
nvme_ctrl_get_cntlid;
1313
nvme_set_features_timestamp2;
1414
nvme_set_features_host_behavior2;
15-
nvme_set_features_host_id2;
1615
};
1716

1817
LIBNVME_1_8 {

src/nvme/ioctl.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -717,18 +717,6 @@ int nvme_set_features_sw_progress(int fd, __u8 pbslc, bool save,
717717
}
718718

719719
int nvme_set_features_host_id(int fd, bool exhid, bool save, __u8 *hostid)
720-
{
721-
__u32 result = 0;
722-
int err;
723-
724-
err = nvme_set_features_host_id2(fd, exhid, save, hostid, &result);
725-
if (err && result)
726-
err = result;
727-
return err;
728-
}
729-
730-
int nvme_set_features_host_id2(int fd, bool exhid, bool save, __u8 *hostid,
731-
__u32 *result)
732720
{
733721
__u32 len = exhid ? 16 : 8;
734722
__u32 value = !!exhid;
@@ -745,7 +733,7 @@ int nvme_set_features_host_id2(int fd, bool exhid, bool save, __u8 *hostid,
745733
.data_len = len,
746734
.data = hostid,
747735
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
748-
.result = result,
736+
.result = NULL,
749737
};
750738

751739
return nvme_set_features(&args);

src/nvme/ioctl.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2903,20 +2903,6 @@ int nvme_set_features_sw_progress(int fd, __u8 pbslc, bool save,
29032903
*/
29042904
int nvme_set_features_host_id(int fd, bool exhid, bool save, __u8 *hostid);
29052905

2906-
/**
2907-
* nvme_set_features_host_id2() - Set enable extended host identifiers feature
2908-
* @fd: File descriptor of nvme device
2909-
* @exhid: Enable Extended Host Identifier
2910-
* @save: Save value across power states
2911-
* @hostid: Host ID to set
2912-
* @result: The command completion result from CQE dword0
2913-
*
2914-
* Return: 0 if the ioctl was successful, -1 with errno set to EPROTO when
2915-
* a non-zero state is returned in @result, or -1 with errno set otherwise.
2916-
*/
2917-
int nvme_set_features_host_id2(int fd, bool exhid, bool save, __u8 *hostid,
2918-
__u32 *result);
2919-
29202906
/**
29212907
* nvme_set_features_resv_mask() - Set reservation notification mask feature
29222908
*

0 commit comments

Comments
 (0)