Skip to content

Commit 036c61e

Browse files
dwsuseigaw
authored andcommitted
Revert "ioctl: add nvme_get_features_timestamp2()"
This reverts commit 5547b93. 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 933a65e commit 036c61e

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
@@ -14,7 +14,6 @@ LIBNVME_1.9 {
1414
nvme_set_features_host_behavior2;
1515
nvme_set_features_host_id2;
1616
nvme_set_features_iocs_profile2;
17-
nvme_get_features_timestamp2;
1817
};
1918

2019
LIBNVME_1_8 {

src/nvme/ioctl.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,18 +1042,6 @@ int nvme_get_features_host_mem_buf2(int fd, enum nvme_get_features_sel sel,
10421042

10431043
int nvme_get_features_timestamp(int fd, enum nvme_get_features_sel sel,
10441044
struct nvme_timestamp *ts)
1045-
{
1046-
__u32 result = 0;
1047-
int err;
1048-
1049-
err = nvme_get_features_timestamp2(fd, sel, ts, &result);
1050-
if (err && result)
1051-
err = result;
1052-
return err;
1053-
}
1054-
1055-
int nvme_get_features_timestamp2(int fd, enum nvme_get_features_sel sel,
1056-
struct nvme_timestamp *ts, __u32 *result)
10571045
{
10581046
struct nvme_get_features_args args = {
10591047
.args_size = sizeof(args),
@@ -1066,7 +1054,7 @@ int nvme_get_features_timestamp2(int fd, enum nvme_get_features_sel sel,
10661054
.data_len = sizeof(*ts),
10671055
.data = ts,
10681056
.timeout = NVME_DEFAULT_IOCTL_TIMEOUT,
1069-
.result = result,
1057+
.result = NULL,
10701058
};
10711059

10721060
return nvme_get_features(&args);

src/nvme/ioctl.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3318,20 +3318,6 @@ int nvme_get_features_host_mem_buf2(int fd, enum nvme_get_features_sel sel,
33183318
int nvme_get_features_timestamp(int fd, enum nvme_get_features_sel sel,
33193319
struct nvme_timestamp *ts);
33203320

3321-
/**
3322-
* nvme_get_features_timestamp2() - Get timestamp feature
3323-
* @fd: File descriptor of nvme device
3324-
* @sel: Select which type of attribute to return, see
3325-
* &enum nvme_get_features_sel
3326-
* @ts: Current timestamp
3327-
* @result: The command completion result from CQE dword0
3328-
*
3329-
* Return: 0 if the ioctl was successful, -1 with errno set to EPROTO when
3330-
* a non-zero state is returned in @result, or -1 with errno set otherwise.
3331-
*/
3332-
int nvme_get_features_timestamp2(int fd, enum nvme_get_features_sel sel,
3333-
struct nvme_timestamp *ts, __u32 *result);
3334-
33353321
/**
33363322
* nvme_get_features_kato() - Get keep alive timeout feature
33373323
* @fd: File descriptor of nvme device

0 commit comments

Comments
 (0)