site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=PNWGfk9iHp9mw64n+QznNAdXiwl73oDzTR2fq9uR2k0=; b=DHP32amEed72C/yBByrPYNGBLyI5nmoeuLgYsc6s40N33FS8l9lt/eZMMrvO9R10pP 5FS5TfH8tETowhzTZNAViueE64gq9OuQYVZyHdUYQrn4zsWUDF1vHvuJ4JD96hh6/51h deczg7JM648dCkeTvwPP8MF0pSQEoPKPhXhe0= Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=k9oaP0OWaPhWypqGqwho+Dppc8fwX7OPi2aI5i6HpMMqMZYs4OSeH+uS+kshAmzo92 7ceK8G6TbjFx7686bnR3/N+DQcrVkh2DdRUtLCcRpq9IIls3whP9Nd0BtQ9QJWBur0rp 4Be4ny1HBhPmwRyTLWTeirDDr4st55hjXrJSU= The mentioned fellow solved this: http://opensource.apple.com/source/xnu/xnu-1228.15.4/bsd/hfs/hfs_xattr.c /* * getmaxinlineattrsize - calculate maximum inline attribute size. * * This yields 3,802 bytes for an 8K node size. */ static size_t getmaxinlineattrsize(struct vnode * attrvp) { struct BTreeInfoRec btinfo; size_t nodesize = ATTRIBUTE_FILE_NODE_SIZE; size_t maxsize; if (attrvp != NULL) { (void) hfs_lock(VTOC(attrvp), HFS_SHARED_LOCK); if (BTGetInformation(VTOF(attrvp), 0, &btinfo) == 0) nodesize = btinfo.nodeSize; hfs_unlock(VTOC(attrvp)); } maxsize = nodesize; maxsize -= sizeof(BTNodeDescriptor); /* minus node descriptor */ maxsize -= 3 * sizeof(u_int16_t); /* minus 3 index slots */ maxsize /= 2; /* 2 key/rec pairs minumum */ maxsize -= sizeof(HFSPlusAttrKey); /* minus maximum key size */ maxsize -= sizeof(HFSPlusAttrData) - 2; /* minus data header */ maxsize &= 0xFFFFFFFE; /* multiple of 2 bytes */ return (maxsize); } ------------------------------------------------------------ http://en.wikipedia.org/wiki/Extended_file_attributes#Mac_OS_X Mac OS X 10.4 and later support extended attributes by making use of the HFS+ filesystem Attributes file B*-tree feature which allows for named forks. Although the named forks in HFS+ support arbitrarily large amounts of data through extents, the OS support for extended attributes only supports inline attributes, limiting their size to that which can fit within a single B*-tree node. Cheers! _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Frank Lahm