From: Vyacheslav Dubeyko <slava@dubeyko.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 21/21] hfsplus: remove can_set_xattr
Date: Thu, 26 Dec 2013 14:15:49 +0400 [thread overview]
Message-ID: <1388052949.4168.91.camel@slavad-ubuntu> (raw)
In-Reply-To: <20131226094853.GA27078@infradead.org>
On Thu, 2013-12-26 at 01:48 -0800, Christoph Hellwig wrote:
> On Tue, Dec 24, 2013 at 10:41:44AM +0400, Vyacheslav Dubeyko wrote:
> > > -
> > > - if (strncmp(name, XATTR_MAC_OSX_PREFIX,
> > > - XATTR_MAC_OSX_PREFIX_LEN) == 0)
> > > - name += XATTR_MAC_OSX_PREFIX_LEN;
> >
> > Removing this skipping of virtual "osx." prefix means that you save it
> > on volume. But such action means volume corruption really. Because HFS+
> > volume hasn't such prefixes for xattrs in AttributesFile. Usually,
> > special xattrs has prefix "com.apple.*" but others haven't any prefix
> > and can be named as you want. So, I think that it is not correct
> > modification.
>
> With my patch applied we don't add the prefix that later gets stripped
> in the first place:
>
> - hfsplus_osx_setxattr gets called without the prefix from the VFS code
> - the code to add the prefix in hfsplus_osx_setxattr is removed by the
> patch
> - the code to remove it again in __hfsplus_setxattr is removed as well
>
> Because of the way the handlers work no other caller of
> __hfsplus_setxattr should ever have a name with the osx prefix.
>
> Same for the getxattr side.
I feel some confusion. :) As far as I can see, generic handlers are
connected with a prefix:
const struct xattr_handler hfsplus_xattr_osx_handler = {
.prefix = XATTR_MAC_OSX_PREFIX,
.list = hfsplus_osx_listxattr,
.get = hfsplus_osx_getxattr,
.set = hfsplus_osx_setxattr,
};
So, if we don't add the "osx." prefix on the fly then it means that we
don't call proper handler. HFS+ doesn't keep "osx." prefix on the volume
because this prefix is Linux way only to process xattrs. For example, I
can create xattr with name "test" under Mac OS X. And this xattr's name
hasn't "osx." prefix. Can I access to this xattr under Linux if we don't
add "osx." prefix on the fly?
Maybe I misunderstand some part of your patch set?
With the best regards,
Vyacheslav Dubeyko.
next prev parent reply other threads:[~2013-12-26 10:15 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 13:16 [PATCH 00/21] Consolidate Posix ACL implementation V3 Christoph Hellwig
2013-12-20 13:16 ` [PATCH 01/21] reiserfs: prefix ACL symbols with reiserfs_ Christoph Hellwig
2013-12-20 13:16 ` [PATCH 02/21] fs: merge xattr_acl.c into posix_acl.c Christoph Hellwig
2013-12-20 13:16 ` [PATCH 03/21] fs: add get_acl helper Christoph Hellwig
2013-12-20 13:16 ` [PATCH 04/21] fs: add a set_acl inode operation Christoph Hellwig
2013-12-20 13:16 ` [PATCH 05/21] fs: add generic xattr_acl handlers Christoph Hellwig
2013-12-20 13:16 ` [PATCH 06/21] fs: make posix_acl_chmod more useful Christoph Hellwig
2013-12-20 13:16 ` [PATCH 07/21] fs: make posix_acl_create " Christoph Hellwig
2013-12-20 13:16 ` [PATCH 08/21] btrfs: use generic posix ACL infrastructure Christoph Hellwig
2013-12-20 13:16 ` [PATCH 09/21] ext2/3/4: " Christoph Hellwig
2013-12-20 13:16 ` [PATCH 10/21] f2fs: " Christoph Hellwig
2013-12-20 13:16 ` [PATCH 11/21] hfsplus: " Christoph Hellwig
2013-12-20 13:16 ` [PATCH 12/21] jffs2: " Christoph Hellwig
2013-12-20 13:16 ` [PATCH 13/21] ocfs2: " Christoph Hellwig
2013-12-20 13:16 ` [PATCH 14/21] reiserfs: " Christoph Hellwig
2013-12-20 13:16 ` [PATCH 15/21] xfs: " Christoph Hellwig
2013-12-20 13:16 ` [PATCH 16/21] jfs: " Christoph Hellwig
2013-12-20 13:16 ` [PATCH 17/21] gfs2: " Christoph Hellwig
2013-12-20 13:16 ` [PATCH 18/21] nfs: use generic posix ACL infrastructure for v3 Posix ACLs Christoph Hellwig
2013-12-20 13:16 ` [PATCH 19/21] fs: remove generic_acl Christoph Hellwig
2013-12-20 13:16 ` [PATCH 20/21] nfsd: use get_acl and ->set_acl Christoph Hellwig
2013-12-20 13:16 ` [PATCH 21/21] hfsplus: remove can_set_xattr Christoph Hellwig
2013-12-21 17:07 ` Vyacheslav Dubeyko
[not found] ` <636E01BC-12FD-452B-8B1C-320B6EADAEFD-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2013-12-22 19:28 ` Christoph Hellwig
2013-12-23 6:40 ` Vyacheslav Dubeyko
2013-12-23 14:37 ` Christoph Hellwig
2013-12-24 6:41 ` Vyacheslav Dubeyko
2013-12-26 9:48 ` Christoph Hellwig
2013-12-26 10:15 ` Vyacheslav Dubeyko [this message]
2013-12-26 10:45 ` Christoph Hellwig
2013-12-26 10:59 ` Vyacheslav Dubeyko
2013-12-23 16:57 ` [PATCH 00/21] Consolidate Posix ACL implementation V3 Chris Mason
2013-12-23 17:01 ` hch
[not found] ` <20131220131635.650823732-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org>
2014-01-07 15:53 ` Christoph Hellwig
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=1388052949.4168.91.camel@slavad-ubuntu \
--to=slava@dubeyko.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--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).