[Top] [All Lists]

Re: Extended attributes limit in Linux

To: Jeff Liu <jeff.liu@xxxxxxxxxx>
Subject: Re: Extended attributes limit in Linux
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 3 Feb 2014 08:37:11 +1100
Cc: Sun_Blood <sblood@xxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <52EB64DC.4020603@xxxxxxxxxx>
References: <CAMN6oR=a0G6O-3CVVkTwhYKavJTa543U3MLezCM8KW1ASZcPnA@xxxxxxxxxxxxxx> <52EB64DC.4020603@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Jan 31, 2014 at 04:54:52PM +0800, Jeff Liu wrote:
> Hello,
> On 01/31 2014 15:40 PM, Sun_Blood wrote:
> > Hello,
> > 
> > If I understands it correctly XFS don't have a limit to the size of
> > extended attributes(EA) but Linux impose a limit at 64k.
> > What I am trying to do is build a backup server that our Apple computers
> > will use together with rsync to backup files to. The problem I face is
> > that Apple HFS+ don't have a limit to EA so it has files with more then
> > 64k of EA in it.
> > 
> > The Linux Kernel has a limit imposed to it in include/linux/limits.h
> > 
> >     #defineXATTR_SIZE_MAX 65536   /* size of an extended attribute value
> >     (64k) */
> > 
> >     #defineXATTR_LIST_MAX 65536   /* size of extended attribute namelist
> >     (64k) */
> > 
> Yes, 64k is the VFS limit per EA value size.

XFS has a limit of 64k as well. I suspect that we could handle
larger EAs without too much problem as we already have the concept
of a "remote EA" that is allocated outside of the attribute btree
(but still inside the attribute address space). The problem with
them is that they are written synchronously, and so large attributes
written this way are slow operations.

Still, until the VFS limit is lifted and we do a bunch more work to
avoid XATTR_SIZE_MAX allocations everywhere there's no point looking
at raising the XFS limit....


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>