On 2026/6/23 10:53, Yifan Zhao wrote:
File-level compression fallback is control flow, not a real error.
Return an erofs-specific status code for it instead of overloading
-ENOSPC, which can also report real space failures.

Keep the global compression context reusable for that fallback while
preserving the fatal state for real errors.

Fixes: a729584ef975 ("erofs-utils: mkfs: avoid hanging if fragment is on and tmpdir 
is full")
Reported-by: Bastian Schmitz <[email protected]>
Closes: https://github.com/erofs/erofs-utils/issues/50
Assisted-by: Codex:GPT-5.5
Signed-off-by: Yifan Zhao <[email protected]>
---
  include/erofs/err.h |  1 +
  lib/compress.c      | 10 +++++++---
  lib/inode.c         |  6 +++---
  3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/include/erofs/err.h b/include/erofs/err.h
index 7dacc91..ef882c9 100644
--- a/include/erofs/err.h
+++ b/include/erofs/err.h
@@ -29,6 +29,7 @@ static inline const char *erofs_strerror(int err)
  }
#define MAX_ERRNO (4095)
+#define EROFS_ERRNO_COMPR_FALLBACK     (MAX_ERRNO + 1)

hmmm, the naming is not quite good, I will think out a
new name and manually change it.


Reply via email to