From 9656e78c3ad8bf18cbaea56c57aef7ac969de174 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 12 Mar 2026 16:16:09 +0000 Subject: TODO Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'util') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index c838b2e5..e8c6ae2e 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1479,6 +1479,17 @@ read_again: */ if ((size_t)rv > (len - rc) /* Prevent overflow */ || rv == 0) { /* Prevent infinite 0-byte loop */ + /* + * TODO: handle rv == 0 this way: + * re-try a finite number of times, + * based on a counter, that resets + * on a non-zero read but then returns + * like below if the counter reaches + * the limit. This will retain the + * current safety, while increasing + * robustness e.g. on unreliable NFS + * shares or really slow media. + */ errno = EIO; return -1; } -- cgit v1.2.1