From dcf698b9a0b33d08a70be40631e8c502e909a2a5 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 19 Mar 2026 07:43:43 +0000 Subject: nvmutil: don't have finite eintr wait this is technically incorrect. we don't control faults in the hardware. Signed-off-by: Leah Rowe --- util/nvmutil/include/common.h | 4 ---- util/nvmutil/lib/file.c | 9 +-------- 2 files changed, 1 insertion(+), 12 deletions(-) (limited to 'util/nvmutil') diff --git a/util/nvmutil/include/common.h b/util/nvmutil/include/common.h index 270e5994..ae805548 100644 --- a/util/nvmutil/include/common.h +++ b/util/nvmutil/include/common.h @@ -59,10 +59,6 @@ int fchmod(int fd, mode_t mode); #define HAVE_REAL_PREAD_PWRITE 0 #endif -#ifndef MAX_EAGAIN_RETRIES -#define MAX_EAGAIN_RETRIES 100000 -#endif - #ifndef LOOP_EAGAIN #define LOOP_EAGAIN 1 #endif diff --git a/util/nvmutil/lib/file.c b/util/nvmutil/lib/file.c index d9ec3011..338f3837 100644 --- a/util/nvmutil/lib/file.c +++ b/util/nvmutil/lib/file.c @@ -606,12 +606,6 @@ prw(int fd, void *mem, unsigned long nrw, int loop_eagain, int loop_eintr, int off_reset) { -#ifndef MAX_EAGAIN_RETRIES - unsigned long retries = 100000; -#else - unsigned long retries = MAX_EAGAIN_RETRIES; -#endif - long r; int positional_rw; struct stat st; @@ -740,8 +734,7 @@ real_pread_pwrite: } while (r == -1 && (errno == try_err(loop_eintr, EINTR) || - errno == try_err(loop_eagain, EAGAIN)) && - retries++ < MAX_EAGAIN_RETRIES); + errno == try_err(loop_eagain, EAGAIN))); } saved_errno = errno; -- cgit v1.2.1