Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Mar 2020 02:56:03 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r359207 - stable/11/usr.sbin/extattr
Message-ID:  <202003220256.02M2u3E3022282@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Sun Mar 22 02:56:03 2020
New Revision: 359207
URL: https://svnweb.freebsd.org/changeset/base/359207

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

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

Modified: stable/11/usr.sbin/extattr/rmextattr.c
==============================================================================
--- stable/11/usr.sbin/extattr/rmextattr.c	Sun Mar 22 02:54:59 2020	(r359206)
+++ stable/11/usr.sbin/extattr/rmextattr.c	Sun Mar 22 02:56:03 2020	(r359207)
@@ -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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003220256.02M2u3E3022282>