From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: What's a realistic size for xattr? Date: Thu, 13 Mar 2008 00:07:37 +0000 Message-ID: <20080313000737.GA12786@shareable.org> References: <200803131106.48181.manningc2@actrix.gen.nz> <1205364753.2766.218.camel@moss-terrapins.epoch.ncsc.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Charles Manning , linux-fsdevel@vger.kernel.org To: Dave Quigley Return-path: Received: from mail2.shareable.org ([80.68.89.115]:33143 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbYCMAHo (ORCPT ); Wed, 12 Mar 2008 20:07:44 -0400 Content-Disposition: inline In-Reply-To: <1205364753.2766.218.camel@moss-terrapins.epoch.ncsc.mil> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Dave Quigley wrote: > > >From my (limited) knowledge of xattr it seems that in theory you could store a > > multi-Mbyte database in xattr, but in practice a smaller size is far more > > reasonable. Clearly storing/managing a small blob is going to be a lot > > simpler. > > > > What is the cut off of a reasonable xattr blob size? 1kbytes? 2kbytes?... > > I just realized that I never really answered your question. I've yet to > see a reasonable SELinux context over 128 characters and Smack labels > should be shorter than that. I don't know what beagle places in xattrs > but I think that would be a good place to take a look for more practical > xattr sizes. People copy files from other systems using rsync, so it's not just Linux uses of xattrs. Also, some programs can store their own data, such as search metadata, desktop metadata, checksums, descriptions (similar to MP3 id tags, but in xattrs) and all sorts of things. 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. -- Jamie