svn commit: r357879 - stable/12/usr.sbin/extattr

Alan Somers asomers at FreeBSD.org
Thu Feb 13 20:45:33 UTC 2020


Author: asomers
Date: Thu Feb 13 20:45:32 2020
New Revision: 357879
URL: https://svnweb.freebsd.org/changeset/base/357879

Log:
  MFC r356809:
  
  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 at freqlabs.com>
  Sponsored by:	iXsystems, Inc.
  Differential Revision:	https://reviews.freebsd.org/D23211

Modified:
  stable/12/usr.sbin/extattr/rmextattr.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/extattr/rmextattr.c
==============================================================================
--- stable/12/usr.sbin/extattr/rmextattr.c	Thu Feb 13 20:41:20 2020	(r357878)
+++ stable/12/usr.sbin/extattr/rmextattr.c	Thu Feb 13 20:45:32 2020	(r357879)
@@ -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;
 


More information about the svn-src-stable mailing list