[PATCH] Modify a vfs.fruit test to work on FreeBSD with fruit:resource=stream

Timur I. Bakeyev timur at com.bat.ru
Sat May 26 23:16:17 UTC 2018


Hi, Ralph!

On 26 May 2018 at 15:12, Ralph Böhme via samba-technical <
samba-technical at lists.samba.org> wrote:

> Hi!
>
> Attached patch modifies a vfs.fruit test to make it work against FreeBSD
> with
> fruit:resource=stream.
>
> With fruit:resource=stream and vfs_streams_xattr stacked behind vfs_fruit,
> the
> AFP_Resource stream ends up being stored in filesytem xattrs. FreeBSD ZFS
> seems
> to support largish xattrs, but 1 GB seems to be too much. As a realistic
> maximums size for AFP_Resource is 64 MB (the largest one I've ever seen
> was 8
> MB), the torture test is updated to use write a 64 MB resource fork
> instead of 1
> GB.
>

Sorry, I seems lost here a bit - what a we trying to address with this
test? FreeBSD ATM natively
supports UFS2 and ZFS for its operations. Both have different constrains
regarding xattrs(extattrs).

UFS2 supports extattrs of up to 64K in TOTAL, i.e. joint size of all
extattrs should be within 64K limit.

ZFS, from other side doesn't limit extattrs size at all, they are first
class citizens there and has the same
size limitations as plain files. In theory, extattrs on ZFS may have their
own extattrs and so on(We need to
go deeper! (c)). In practice FreeBSD doesn't support that and, also has
very crappy API for extattrs, where
you have to write whole data blob in one write, despite it's size

Saying that, both 64Mb and 1Gb xattrs will behave the same - for UFS2
writing them will fail, for ZFS both
will succeed. So, that change will possibly improve total execution time
only.

As for the observed ADS size we've seen in the wild a 10Mb one, generated
by Adobe software on MacOS.

With best regards,
Timur Bakeyev.


More information about the samba-technical mailing list