Skip to content

Commit 9851832

Browse files
committed
Revert "fabrics: retry connect command on EINTR"
This reverts commit 2b30489. The simple approach to retry on EINTR will also prevent to exit the loop on Ctrl-C. And adding a signal handler in the library is generally not a good idea. It would need an additional API between users and the library to handle signals. Let's forward EINTR and the user handle this instead. Signed-off-by: Daniel Wagner <wagi@kernel.org>
1 parent 1302510 commit 9851832

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

meson.build

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -244,20 +244,6 @@ else
244244
conf.set('fallthrough', 'do {} while (0) /* fallthrough */')
245245
endif
246246

247-
if cc.has_function('TEMP_FAILURE_RETRY', prefix : '#include <errno.h>')
248-
conf.set('TFR', 'TEMP_FAILURE_RETRY')
249-
else
250-
conf.set('TFR(exp)', ''' \
251-
({ \
252-
long int __result = 0; \
253-
do { \
254-
__result = (long int)(exp); \
255-
} while ((__result == -1) && (errno == EINTR)); \
256-
__result; \
257-
})
258-
''')
259-
endif
260-
261247
################################################################################
262248
substs = configuration_data()
263249
substs.set('NAME', meson.project_name())

src/nvme/fabrics.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ static int __nvmf_add_ctrl(nvme_root_t r, const char *argstr)
814814

815815
nvme_msg(r, LOG_DEBUG, "connect ctrl, '%.*s'\n",
816816
(int)strcspn(argstr,"\n"), argstr);
817-
ret = TFR(write(fd, argstr, len));
817+
ret = write(fd, argstr, len);
818818
if (ret != len) {
819819
nvme_msg(r, LOG_INFO, "Failed to write to %s: %s\n",
820820
nvmf_dev, strerror(errno));

0 commit comments

Comments
 (0)