Skip to content

Commit 933a65e

Browse files
dwsuseigaw
authored andcommitted
Revert "ioctl: add nvme_get_features_host_id2()"
This reverts commit 3d9ab1d. 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 d559459 commit 933a65e

2 files changed

Lines changed: 3 additions & 30 deletions

File tree

src/nvme/ioctl.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,19 +1194,7 @@ int nvme_get_features_sw_progress(int fd, enum nvme_get_features_sel sel,
11941194
}
11951195

11961196
int nvme_get_features_host_id(int fd, enum nvme_get_features_sel sel,
1197-
bool exhid, __u32 len, __u8 *hostid)
1198-
{
1199-
__u32 result = 0;
1200-
int err;
1201-
1202-
err = nvme_get_features_host_id2(fd, sel, exhid, len, hostid, &result);
1203-
if (err && result)
1204-
err = result;
1205-
return err;
1206-
}
1207-
1208-
int nvme_get_features_host_id2(int fd, enum nvme_get_features_sel sel,
1209-
bool exhid, __u32 len, __u8 *hostid, __u32 *result)
1197+
bool exhid, __u32 len, __u8 *hostid)
12101198
{
12111199
struct nvme_get_features_args args = {
12121200
.args_size = sizeof(args),
@@ -1219,7 +1207,7 @@ int nvme_get_features_host_id2(int fd, enum nvme_get_features_sel sel,
12191207
.data_len = len,
12201208
.data = hostid,
12211209
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
1222-
.result = result,
1210+
.result = NULL,
12231211
};
12241212

12251213
return nvme_get_features(&args);

src/nvme/ioctl.h

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3479,22 +3479,7 @@ int nvme_get_features_sw_progress(int fd, enum nvme_get_features_sel sel,
34793479
* &enum nvme_status_field) or -1 with errno set otherwise.
34803480
*/
34813481
int nvme_get_features_host_id(int fd, enum nvme_get_features_sel sel,
3482-
bool exhid, __u32 len, __u8 *hostid);
3483-
3484-
/**
3485-
* nvme_get_features_host_id2() - Get host id feature
3486-
* @fd: File descriptor of nvme device
3487-
* @sel: Select which type of attribute to return, see &enum nvme_get_features_sel
3488-
* @exhid: Enable Extended Host Identifier
3489-
* @len: Length of @hostid
3490-
* @hostid: Buffer for returned host ID
3491-
* @result: The command completion result from CQE dword0
3492-
*
3493-
* Return: 0 if the ioctl was successful, -1 with errno set to EPROTO when
3494-
* a non-zero state is returned in @result, or -1 with errno set otherwise.
3495-
*/
3496-
int nvme_get_features_host_id2(int fd, enum nvme_get_features_sel sel,
3497-
bool exhid, __u32 len, __u8 *hostid, __u32 *result);
3482+
bool exhid, __u32 len, __u8 *hostid);
34983483

34993484
/**
35003485
* nvme_get_features_resv_mask() - Get reservation mask feature

0 commit comments

Comments
 (0)