From: Hin-Tak Leung Subject: Re: [PATCH 3/3] hfsplus: implement attributes file creation functionality Date: Tue, 24 Sep 2013 12:40:49 +0100 (BST) Message-ID: <1380022849.33150.YahooMailBasic@web172302.mail.ir2.yahoo.com> Reply-To: htl10@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, hch@infradead.org, akpm@linux-foundation.org To: slava@dubeyko.com Return-path: Received: from nm4-vm1.bullet.mail.ird.yahoo.com ([77.238.189.201]:45546 "HELO nm4-vm1.bullet.mail.ird.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750771Ab3IXLkv convert rfc822-to-8bit (ORCPT ); Tue, 24 Sep 2013 07:40:51 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: ------------------------------ 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] >>=A0=20 >>=A0 This patch implements functionality of creation >>=A0 AttributesFile metadata file on HFS+ volume in the case of absenc= e of it. >>=A0=20 >>=A0 It makes trying to open AttributesFile's B-tree during mount >>=A0 of HFS+ volume. If HFS+ volume hasn't AttributesFile then a >>=A0 pointer on AttributesFile's B-tree keeps as NULL. Thereby, when i= t >>=A0 is discovered absence of AttributesFile on HFS+ volume in the >>=A0 begin of xattr creation operation then AttributesFile will be >>=A0 created. >>=A0=20 >>=A0 The creation of AttributesFile will have success in the case >>=A0 of availability (2 * clump) free blocks on HFS+ volume. >>=A0 Otherwise, creation operation is ended with error (-ENOSPC). > >[snip] >>=20 >> The changelog isn't quite correct/precise. According to the code (my= reading and >> understanding of it), The AttributesFile is created on first need, i= =2Ee. when the first-ever >> attribute is set. The changelog sounds as if an empty one might be c= reated >> if missing, on mount. The latter would be somewhat undesirable, as a= user might >> just keep a particular disk quite full but contain entirely of plain= no-attribute files, and >> have no need of a big AttributesFile ever, and suddenly find a disk = throwing an previously-not-seen >> error on use. >>=20 > >I don't think that description of the patch set is inaccurate. And I >misunderstand how you can conclude from path set description that >AttributesFile is created during mount operation. The patch descriptio= n >states that HFS+ driver tries to open AttributesFile's tree by means o= f >hfs_btree_open() call (but such call takes place only if total blocks = of >AttributesFile doesn't equal to zero). So, hfs_btree_open() method >doesn't contain any code of creation AttributesFile. And, finally, >description of the patch states that AttributesFile creation >functionality can be called in the begin of operation of extended >attribute (xattr) creation, namely, in __hfsplus_setxattr() method. "...during mount...", first sentence, 2nd paragraph. >> 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 support= s this, to an hfs+ fs without >> a=A0 AttributesFile yet. How does hfs+ under Mac OS behaves vs curre= nt 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 ex= perience?), drag-and-drop from Finder does copy some xattrs/rscs ; and I seem to remember have ca= me across an enhancement patch for rsync which does that too, which has either been merged upstr= eam or shipped-as-patched. While the command-line 'cp' does not do it by default, isn't there an o= ption for doing it? Hin-Tak -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html