aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2020-01-16 21:31:56 +0000
committerAlan Somers <asomers@FreeBSD.org>2020-01-16 21:31:56 +0000
commit1137d1a7e575a897d6d7d5784c4c01498c419d9b (patch)
treed59f3dc8ce97569aa4327d0a891a2aeae363f440
parentbcd380e88b26deba8acd870374dc00e21637b500 (diff)
downloadsrc-1137d1a7e575a897d6d7d5784c4c01498c419d9b.tar.gz
src-1137d1a7e575a897d6d7d5784c4c01498c419d9b.zip
setextattr: Increase stdin buffer size to 4096
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. Submitted by: Ryan Moeller <ryan@freqlabs.com> MFC after: 2 weeks Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D23211
Notes
Notes: svn path=/head/; revision=356809
-rw-r--r--usr.sbin/extattr/rmextattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/extattr/rmextattr.c b/usr.sbin/extattr/rmextattr.c
index d146c167d379..0daf15cec940 100644
--- a/usr.sbin/extattr/rmextattr.c
+++ b/usr.sbin/extattr/rmextattr.c
@@ -104,7 +104,7 @@ mkbuf(char **buf, int *oldlen, int newlen)
int
main(int argc, char *argv[])
{
-#define STDIN_BUF_SZ 1024
+#define STDIN_BUF_SZ 4096
char stdin_data[STDIN_BUF_SZ];
char *p;