From: Hin-Tak Leung Subject: Re: [PATCH 3/3] hfsplus: implement attributes file creation functionality Date: Fri, 20 Sep 2013 23:30:38 +0100 (BST) Message-ID: <1379716238.55511.YahooMailBasic@web172304.mail.ir2.yahoo.com> References: <1379671462.2280.29.camel@slavad-ubuntu> Reply-To: htl10@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Cc: Al Viro , Christoph Hellwig , Andrew Morton To: Linux FS devel list , slava@dubeyko.com Return-path: Received: from nm6.bullet.mail.ird.yahoo.com ([77.238.189.63]:44384 "EHLO nm6.bullet.mail.ird.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754035Ab3ITWal convert rfc822-to-8bit (ORCPT ); Fri, 20 Sep 2013 18:30:41 -0400 In-Reply-To: <1379671462.2280.29.camel@slavad-ubuntu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: -------------------------------------------- On Fri, 20/9/13, Vyacheslav Dubeyko wrote: Subject: [PATCH 3/3] hfsplus: implement attributes file creation functionality To: "Linux FS devel list" Cc: "Al Viro" , "Christoph Hellwig" , "Hin-Tak Leung" , "Andrew Morton" Date: Friday, 20 September, 2013, 11:04 From: Vyacheslav Dubeyko Subject: [PATCH 3/3] hfsplus: implement attributes file creation functionality 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). Signed-off-by: Vyacheslav Dubeyko CC: Al Viro CC: Christoph Hellwig CC: Hin-Tak Leung --- Acked-by: Hin-Tak Leung 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.e. when the first-ever attribute is set. The changelog sounds as if an empty one might be created 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. 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 ?) Hin-Tak