[WIP] [PATCH] vfs_streams_xattr: Don't terminate streams with extra '\0' byte.

Timur I. Bakeyev timur at freebsd.org
Fri Jun 29 21:09:38 UTC 2018


This is a work in progress, while being already successfully running on
FreeBSD for half a year(with few bugs fixed in the meantime) that I
originally done to break 64K limit for the stream size, stored in the
extended attribute. This limit is hardcoded in the `get_ea_value()` which
is used by current implementation to store streams in the xattr.

Incidentally that also fixes the issue where xattrs are forced to be
nul-terminated, which create interoperability issues:


I'd like the list to review and comment this code and evaluate possibility
of adding it to the upstream Samba.

Few obvious points that require additional work:

    * There should be a migration path from the old way of storing xattrs
to the new one, which would remove terminating '\0' from the currently
stored streams.
That can be added to the `mvxattr` functionality as well as a separate tool
can be written.

    * This haven't been tested on Linux and other platforms, so may expose
some oddities.

With regards,
Timur Bakeyev.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-the-64K-limitation-for-the-stream-by-replacin.patch
Type: application/octet-stream
Size: 15899 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180629/84618c8c/0001-Remove-the-64K-limitation-for-the-stream-by-replacin.obj>

More information about the samba-technical mailing list