From: "Ernesto A. Fernández" <ernesto.mnd.fernandez@gmail.com>
To: Hin-Tak Leung <htl10@users.sourceforge.net>,
linux-fsdevel@vger.kernel.org
Cc: "Al Viro" <viro@zeniv.linux.org.uk>,
"Andreas Gruenbacher" <agruenba@redhat.com>,
"Hin-Tak Leung" <htl10@users.sourceforge.net>,
"Vyacheslav Dubeyko" <slava@dubeyko.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Ernesto A. Fernández" <ernesto.mnd.fernandez@gmail.com>
Subject: Re: [PATCH] hfsplus: return ENODATA when no xattr is found
Date: Thu, 19 Oct 2017 20:02:47 -0300 [thread overview]
Message-ID: <20171019230246.GA1271@debian.home> (raw)
In-Reply-To: <51697605.866452.1508445053840@mail.yahoo.com>
On Thu, Oct 19, 2017 at 08:30:53PM +0000, Hin-Tak Leung wrote:
>
> --------------------------------------------
> On Thu, 19/10/17, Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com> wrote:
>
> > There are several points in the code where ENOENT or
> > EOPNOTSUPP are
> > used to signal that an extended attribute does not exist.
> > This is
> > clearly noticeable from the odd error messages shown by
> > setfattr and
> > getfattr. Use ENODATA instead.
>
> > Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
>
> Nacked.
>
> I think you perhaps mis-understood the code. Some (older) HFS+ file system does not have attribute records so it gives EOPNOTSUPP . It is not NODATA, but that you cannot write attribute data(or read) to such old fs. Likewise, the other changes from ENOENT to ENODATA seems wrong too. "Not found" is not "no data" ( = "found but null").
>
If you create a fresh hfsplus filesystem and run:
touch test
setfattr -x user.1 test
you will get an "operation not supported" error. That isn't right. Now
if you run:
setfattr -n user.1 test
setfattr -x user.1 test
setfattr -x user.1 test
you will get a "no such file or directory" error. Also bad, the file is
right there. This one is caused by the ENOENT.
next prev parent reply other threads:[~2017-10-19 23:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <51697605.866452.1508445053840.ref@mail.yahoo.com>
2017-10-19 20:30 ` [PATCH] hfsplus: return ENODATA when no xattr is found Hin-Tak Leung
2017-10-19 23:02 ` Ernesto A. Fernández [this message]
2017-10-20 0:15 ` Viacheslav Dubeyko
2017-10-20 0:54 ` Ernesto A. Fernández
2017-10-19 19:41 Ernesto A. Fernández
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=20171019230246.GA1271@debian.home \
--to=ernesto.mnd.fernandez@gmail.com \
--cc=agruenba@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=htl10@users.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).