Skip to content

Commit c1989bf

Browse files
committed
ioctl: retry ioctl on EINTR return value
Recent changes in the nvme-tcp transport started to return EINTR due to a signal while reading from a socket. The transport could retry the operation but so far this hasn't been implemented. Thus we retry in userpace the connect call when EINTR is returned. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 0172e65 commit c1989bf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/nvme/ioctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ int nvme_submit_passthru64(int fd, unsigned long ioctl_cmd,
8787
struct nvme_passthru_cmd64 *cmd,
8888
__u64 *result)
8989
{
90-
int err = ioctl(fd, ioctl_cmd, cmd);
90+
int err = TFR(ioctl(fd, ioctl_cmd, cmd));
9191

9292
if (err >= 0 && result)
9393
*result = cmd->result;
@@ -98,7 +98,7 @@ __attribute__((weak))
9898
int nvme_submit_passthru(int fd, unsigned long ioctl_cmd,
9999
struct nvme_passthru_cmd *cmd, __u32 *result)
100100
{
101-
int err = ioctl(fd, ioctl_cmd, cmd);
101+
int err = TFR(ioctl(fd, ioctl_cmd, cmd));
102102

103103
if (err >= 0 && result)
104104
*result = cmd->result;

0 commit comments

Comments
 (0)