[Samba] Interoperability with MAC OSX clients, resource forks, xattrs
stefan at loplof.de
Tue Jan 3 13:13:24 MST 2012
> I'm working on a adouble backend for _Netatalk_ which will store all Mac
> extra data in extended attributes. As you've noticed most filesystems limit
> the maximum size of EAs, therefore the new adouble module will split Mac
> ressourceforks larger than this limit into multiple EAs.
even though it's getting slightly off topic now, this might also be
interesting for the vfs_streams_xattr module.
During my tests I realized that EAs are treated as some kind of second class
citizens by the linux kernel when compared against the data of a file. You can
already see it on the prototype of getxattr() that just allows to read or
write the complete EA value, but not parts of it or seeking.
Even worse, the kernel needs to allocate the value buffer as a contiguous
block of kernel memory - up to 64k on XFS or reiserfs. This is a quite
ambitious operation in kernel space and it failed several times on my test
server even though it is equipped with 8G RAM and was just serving one OSX
client at that time. You see these nice 'order 4 allocation failed' logs in
the dmesg output then, also causing the getxattr() or setxattr() operation to
I don't want to discourage you - but you may have a hard time getting this
idea to run stable.
More information about the samba