xfs
[Top] [All Lists]

Re: Extended attributes limit in Linux

To: Jeff Liu <jeff.liu@xxxxxxxxxx>
Subject: Re: Extended attributes limit in Linux
From: Vyacheslav Dubeyko <slava@xxxxxxxxxxx>
Date: Fri, 31 Jan 2014 14:44:43 +0400
Cc: Sun_Blood <sblood@xxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dubeyko.com; s=default; h=Mime-Version:Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID; bh=vjW+EvhWLMS/q16ua6ErK/cLWKGuNMjhmUGQ1nx0fwI=; b=gW1wCfxbYFEs0R+ern1S6OZcqH3V7eAyEzs5CZWYQXQrRwgiG3tO1dVyuOJOqQPUr+fe8MzZWGX+XR+IlRerqniWsRN01p+HQvMuhpR7w2j+FvswtWmSCqG58q/MP9s5;
In-reply-to: <52EB64DC.4020603@xxxxxxxxxx>
References: <CAMN6oR=a0G6O-3CVVkTwhYKavJTa543U3MLezCM8KW1ASZcPnA@xxxxxxxxxxxxxx> <52EB64DC.4020603@xxxxxxxxxx>
On Fri, 2014-01-31 at 16:54 +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.

Technical Note TN1150:
"In an HFS Plus B-tree, the node size is determined by a field
(nodeSize) in the header node. The node size must be a power from 512
through 32,768."

So, as minimum, xattrs unable to be a larger than node size.

But xattrs' size has limitation anyway:

https://github.com/darwin-on-arm/xnu/blob/master/bsd/hfs/hfs.h#L849

/* Maximum extended attribute size supported for all extended attributes except
* resource fork and finder info.
*/
#define HFS_XATTR_MAXSIZE (128 * 1024)

So, I need to check and correct slightly HFS+ xattrs support code.
Because, I used 3082 bytes limitation value. 

Thanks,
Vyacheslav Dubeyko.

> > 
> > 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.
> > Changing this values feels unsafe because they will be system wide.
> > 
> > Is the any possibility to combine Linux + XFS to make a backup that
> > works with EA or is this more a question for kernel.org <http://kernel.org>?
> 
> So if an EA value size on HFS+ is larger than 64k, I suspect it would failed 
> to preserve
> on Linux+XFS... But if a file has multiple EAs, and each EA's value size is 
> <= 64K, it
> would be works IMO.
> 
> Thanks,
> -Jeff
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs


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