From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Dilger Subject: Re: What's a realistic size for xattr? Date: Wed, 12 Mar 2008 21:45:06 -0600 Message-ID: <20080313034506.GD5851@webber.adilger.int> References: <200803131106.48181.manningc2@actrix.gen.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT Cc: linux-fsdevel@vger.kernel.org To: Charles Manning Return-path: Received: from sca-es-mail-1.Sun.COM ([192.18.43.132]:44881 "EHLO sca-es-mail-1.sun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751797AbYCMDq0 (ORCPT ); Wed, 12 Mar 2008 23:46:26 -0400 Received: from fe-sfbay-10.sun.com ([192.18.43.129]) by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m2D3kOTf010459 for ; Wed, 12 Mar 2008 20:46:24 -0700 (PDT) Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JXN00H01H35KD00@fe-sfbay-10.sun.com> (original mail from adilger@sun.com) for linux-fsdevel@vger.kernel.org; Wed, 12 Mar 2008 20:46:24 -0700 (PDT) In-reply-to: <200803131106.48181.manningc2@actrix.gen.nz> Content-disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mar 13, 2008 11:06 +1300, Charles Manning wrote: > I'm trying to figure out a reasonable approach to implementing xattr in YAFFS. > > 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?... As a point of reference, ext2/3/4 limit the total xattr size to 1 data block (4kB commonly), and I believe XFS has a total limit of 64kB. ZFS and NTFS have resource forks, which can store arbitrary data, but they have a different API. On NTFS the word is that resource forks are mostly used by root kits. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc.