From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:56245 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751046AbdJTAPP (ORCPT ); Thu, 19 Oct 2017 20:15:15 -0400 Received: by mail-pf0-f195.google.com with SMTP id 17so8387078pfn.12 for ; Thu, 19 Oct 2017 17:15:15 -0700 (PDT) Message-ID: <1508458513.501.3.camel@dubeyko.com> Subject: Re: [PATCH] hfsplus: return ENODATA when no xattr is found From: Viacheslav Dubeyko To: "Ernesto A." =?ISO-8859-1?Q?Fern=E1ndez?= , Hin-Tak Leung , linux-fsdevel@vger.kernel.org Cc: Al Viro , Andreas Gruenbacher , Andrew Morton Date: Thu, 19 Oct 2017 17:15:13 -0700 In-Reply-To: <20171019230246.GA1271@debian.home> References: <51697605.866452.1508445053840.ref@mail.yahoo.com> <51697605.866452.1508445053840@mail.yahoo.com> <20171019230246.GA1271@debian.home> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 2017-10-19 at 20:02 -0300, Ernesto A. Fernández wrote: > On Thu, Oct 19, 2017 at 08:30:53PM +0000, Hin-Tak Leung wrote: > > > > > > -------------------------------------------- > > On Thu, 19/10/17, Ernesto A. Fernández > .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 > > 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. You suggested to exclude all this code (xattr support) from the HFS+ file system driver. What is the point to review your patches for the code that will be deleted? If this code will be deleted then no troubles anymore. Forget and relax. Regards, Vyacheslav Dubeyko.