On Sep 24, 2013, at 3:40 PM, Hin-Tak Leung wrote: > ------------------------------ > On Mon, Sep 23, 2013 07:33 BST Vyacheslav Dubeyko wrote: > >> On Fri, 2013-09-20 at 23:30 +0100, Hin-Tak Leung wrote: >>> -------------------------------------------- >> >> [snip] >>> >>> This patch implements functionality of creation >>> AttributesFile metadata file on HFS+ volume in the case of absence of it. >>> >>> It makes trying to open AttributesFile's B-tree during mount >>> of HFS+ volume. If HFS+ volume hasn't AttributesFile then a >>> pointer on AttributesFile's B-tree keeps as NULL. Thereby, when it >>> is discovered absence of AttributesFile on HFS+ volume in the >>> begin of xattr creation operation then AttributesFile will be >>> created. >>> >>> The creation of AttributesFile will have success in the case >>> of availability (2 * clump) free blocks on HFS+ volume. >>> Otherwise, creation operation is ended with error (-ENOSPC). >> [snip] > > "...during mount...", first sentence, 2nd paragraph. > Where do you see statement about trying to create AttributesFile during mount in first sentence of 2nd paragraph? This statement tells about opening B-tree during mount. But opening is not creation, as far as I can see. >>> Usage on linux would mostly be standalone xsetattr; the other common use would be >>> the copy of a file plus its attribute, from another fs which supports this, to an hfs+ fs without >>> a AttributesFile yet. How does hfs+ under Mac OS behaves vs current Linux vs patched Linux? >>> (silently dropping attribute/drop attribute with warning/error/etc ?) >> >> As far as I can judge, Mac OS X doesn't copy xattrs of files during >> copying operation. And, as far as I can see, Linux does it in the same >> way. Anyway, a file system driver should have some set of method for >> xattrs support. And HFS+ driver has all necessary methods (for xattrs >> support) as implemented. > > I meant the generic user-invoked "copy" operation. AFAIK (first hand experience?), drag-and-drop > from Finder does copy some xattrs/rscs ; and I seem to remember have came across an enhancement > patch for rsync which does that too, which has either been merged upstream or shipped-as-patched. > While the command-line 'cp' does not do it by default, isn't there an option for doing it? > This is question to "cp" utility. Finder is complex application in user-space. So, it can create xattrs during copying operation. But HFS+ driver implements all necessary methods (listxattr, getxattr, setxattr, removexattr) that it is called by VFS layer. With the best regards, Vyacheslav Dubeyko. -- 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