linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	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 02:45:32 -0800	[thread overview]
Message-ID: <20131226104532.GA11456@infradead.org> (raw)
In-Reply-To: <1388052949.4168.91.camel@slavad-ubuntu>

On Thu, Dec 26, 2013 at 02:15:49PM +0400, Vyacheslav Dubeyko wrote:
> 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?

Most filesystems don't store the prefix on disk, but instead a binary
namespace, that's why the handler code strips it (although we might want
to eventually add a flag to not strip it given that we have a few
filesystems storing it now).

So let's look at the case of a fgetxattr(fd, "osx.foo", ...) with the old
and my new code.

Old:

 \---		sys_fgetxattr(fd, "osx.foo", ....
  \			...
   \---		generic_getxattr(dentry, "osx.foo", ...
    \			[xattr_resolve_name strips the prefix]
     \---	hfsplus_osx_getxattr(dentry, "foo", ...
      \			[adds back prefix]
       \		...
        \---	__hfsplus_getxattr(dentry, "osx.foo", ...
	 \		[strips the prefix again]
	  \---	hfsplus_find_attr(sb, ino, "foo", ...


New:

 \---		sys_fgetxattr(fd, "osx.foo", ....
  \			...
   \---		generic_getxattr(dentry, "osx.foo", ...
    \			[xattr_resolve_name strips the prefix]
     \---	hfsplus_osx_getxattr(dentry, "foo", ...
      \			...
       \---	__hfsplus_getxattr(dentry, "foo", ...
        \---	hfsplus_find_attr(sb, ino, "foo", ...


  reply	other threads:[~2013-12-26 10:45 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
2013-12-26 10:45                   ` Christoph Hellwig [this message]
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=20131226104532.GA11456@infradead.org \
    --to=hch@infradead.org \
    --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).