Page MenuHomeFreeBSD

setextattr: Increase stdin buffer size to 4096
ClosedPublic

Authored by freqlabs on Jan 16 2020, 7:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 2:53 AM
Unknown Object (File)
Fri, Oct 10, 6:00 AM
Unknown Object (File)
Wed, Oct 8, 2:03 AM
Unknown Object (File)
Sun, Oct 5, 2:56 PM
Unknown Object (File)
Fri, Sep 19, 2:42 PM
Unknown Object (File)
Tue, Sep 16, 4:48 PM
Unknown Object (File)
Aug 2 2025, 10:55 AM
Unknown Object (File)
Jul 25 2025, 9:08 AM
Subscribers

Details

Summary

Extended attribute values can potentially be quite large. One test for ZFS is supposed to set a 200MB xattr. However, the buffer size for reading values from stdin with setextattr -i is so small that the test times out waiting for tiny chunks of data to be buffered and appended to an sbuf.

Increasing the buffer size should help alleviate some of the burden of reallocating larger sbufs when writing large extended attributes.

Sponsored by: iXsystems, Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable