From: Vyacheslav Dubeyko <slava@dubeyko.com>
To: htl10@users.sourceforge.net
Cc: Linux FS devel list <linux-fsdevel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Christoph Hellwig <hch@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 3/3] hfsplus: implement attributes file creation functionality
Date: Mon, 23 Sep 2013 10:33:12 +0400 [thread overview]
Message-ID: <1379917992.2331.27.camel@slavad-ubuntu> (raw)
In-Reply-To: <1379716238.55511.YahooMailBasic@web172304.mail.ir2.yahoo.com>
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]
>
> 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.
>
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 description
states that HFS+ driver tries to open AttributesFile's tree by means of
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.
> 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.
With the best regards,
Vyacheslav Dubeyko.
next prev parent reply other threads:[~2013-09-23 6:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-20 10:04 [PATCH 3/3] hfsplus: implement attributes file creation functionality Vyacheslav Dubeyko
2013-09-20 22:30 ` Hin-Tak Leung
2013-09-23 6:33 ` Vyacheslav Dubeyko [this message]
2013-09-25 23:02 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2013-09-24 11:40 Hin-Tak Leung
2013-09-24 12:04 ` Vyacheslav Dubeyko
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=1379917992.2331.27.camel@slavad-ubuntu \
--to=slava@dubeyko.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=htl10@users.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--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).