From: Brad Boyer Subject: Re: What's a realistic size for xattr? Date: Wed, 12 Mar 2008 17:27:54 -0700 Message-ID: <20080313002754.GA1837@cynthia.pants.nu> References: <200803131106.48181.manningc2@actrix.gen.nz> <1205364753.2766.218.camel@moss-terrapins.epoch.ncsc.mil> <20080313000737.GA12786@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Dave Quigley , Charles Manning , linux-fsdevel@vger.kernel.org To: Jamie Lokier Return-path: Received: from adsl-76-245-85-235.dsl.pltn13.sbcglobal.net ([76.245.85.235]:59035 "EHLO cynthia.pants.nu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751687AbYCMAyl (ORCPT ); Wed, 12 Mar 2008 20:54:41 -0400 Content-Disposition: inline In-Reply-To: <20080313000737.GA12786@shareable.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Mar 13, 2008 at 12:07:37AM +0000, Jamie Lokier wrote: > On Macs, xattrs are used to store the "resource fork", which contains > icons etc. so can be quite large. Of course that's not done on Linux. > People do sometimes try to copy those files to Linux and back, and it > generally fails because Linux refuses the large xattrs. The resource fork in HFS/HFS+ is not considered an xattr at all. In fact, it's effectively another file that just happens to be attached to the same inode-equivalent. There is a data fork (seen as a normal file for unix) and the resource fork, and it's just the posix style API that treats one as more important than the other. The two are considered peers in the on-disk format and in the classic mac API. The only way I've seen the resource fork stored on a non-Apple fs is as a named stream style format or some kind of encoded single file format like AppleSingle/AppleDouble or BinHex. If you really want to talk about size, there is a lot more than icons and metadata stored in the resource fork. In the m68k era, the compiled code was also stored in the resource fork with each segment showing up as a numbered resource of type 'CODE' that could be dynamically loaded and released. If you look at an application from those days, it most likely has a 0-length data fork. Brad Boyer flar@allandria.com