All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: linux-erofs@lists.ozlabs.org
Cc: Gao Xiang <hsiangkao@linux.alibaba.com>
Subject: [PATCH 3/3] erofs-utils: lib: fix errors when building xattrs
Date: Thu,  9 Mar 2023 19:26:30 +0800	[thread overview]
Message-ID: <20230309112630.74230-3-hsiangkao@linux.alibaba.com> (raw)
In-Reply-To: <20230309112630.74230-1-hsiangkao@linux.alibaba.com>

EOPNOTSUPP could be reported by llistxattr() and mkfs.erofs could
fail out due to the following error:

<E> erofs: llistxattr to get the size of names for xxxxx failed
<E> erofs: 	Could not format the device : [Error 95] Operation not supported

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
 lib/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/xattr.c b/lib/xattr.c
index 024ecbe..dbe0519 100644
--- a/lib/xattr.c
+++ b/lib/xattr.c
@@ -315,7 +315,7 @@ static int read_xattrs_from_file(const char *path, mode_t mode,
 	unsigned int keylen;
 	struct xattr_item *item;
 
-	if (kllen < 0 && errno != ENODATA) {
+	if (kllen < 0 && errno != ENODATA && errno != EOPNOTSUPP) {
 		erofs_err("llistxattr to get the size of names for %s failed",
 			  path);
 		return -errno;
-- 
2.24.4


      parent reply	other threads:[~2023-03-09 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 11:26 [PATCH 1/3] erofs-utils: optimize dedupe matching Gao Xiang
2023-03-09 11:26 ` [PATCH 2/3] erofs-utils: improve documentation for upcoming 1.6 Gao Xiang
2023-03-09 11:26 ` Gao Xiang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230309112630.74230-3-hsiangkao@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.