From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 21/21] hfsplus: remove can_set_xattr Date: Thu, 26 Dec 2013 01:48:53 -0800 Message-ID: <20131226094853.GA27078@infradead.org> References: <20131220131635.650823732@bombadil.infradead.org> <20131220132524.900291394@bombadil.infradead.org> <636E01BC-12FD-452B-8B1C-320B6EADAEFD@dubeyko.com> <20131222192818.GA32565@infradead.org> <1387780809.3991.21.camel@slavad-ubuntu> <20131223143706.GA8235@infradead.org> <1387867304.3974.21.camel@slavad-ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org To: Vyacheslav Dubeyko Return-path: Received: from bombadil.infradead.org ([198.137.202.9]:44133 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751733Ab3LZJsz (ORCPT ); Thu, 26 Dec 2013 04:48:55 -0500 Content-Disposition: inline In-Reply-To: <1387867304.3974.21.camel@slavad-ubuntu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Dec 24, 2013 at 10:41:44AM +0400, Vyacheslav Dubeyko wrote: > > - > > - if (strncmp(name, XATTR_MAC_OSX_PREFIX, > > - XATTR_MAC_OSX_PREFIX_LEN) == 0) > > - name += XATTR_MAC_OSX_PREFIX_LEN; > > Removing this skipping of virtual "osx." prefix means that you save it > on volume. But such action means volume corruption really. Because HFS+ > volume hasn't such prefixes for xattrs in AttributesFile. Usually, > special xattrs has prefix "com.apple.*" but others haven't any prefix > and can be named as you want. So, I think that it is not correct > modification. With my patch applied we don't add the prefix that later gets stripped in the first place: - hfsplus_osx_setxattr gets called without the prefix from the VFS code - the code to add the prefix in hfsplus_osx_setxattr is removed by the patch - the code to remove it again in __hfsplus_setxattr is removed as well Because of the way the handlers work no other caller of __hfsplus_setxattr should ever have a name with the osx prefix. Same for the getxattr side.