Re: [PATCH 21/21] hfsplus: remove can_set_xattr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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", ...

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux