From owner-svn-src-head@freebsd.org Fri Jul 7 16:54:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F95CDA7950; Fri, 7 Jul 2017 16:54:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6958782279; Fri, 7 Jul 2017 16:54:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v67GsI9X006163; Fri, 7 Jul 2017 16:54:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v67GsIaZ006162; Fri, 7 Jul 2017 16:54:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201707071654.v67GsIaZ006162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 7 Jul 2017 16:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320787 - head/sbin/newfs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/newfs X-SVN-Commit-Revision: 320787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 16:54:20 -0000 Author: imp Date: Fri Jul 7 16:54:18 2017 New Revision: 320787 URL: https://svnweb.freebsd.org/changeset/base/320787 Log: Improve wording for -E and -t flags. -E never writes the entire disk, so don't imply that. Note that if BIO_DELETE isn't supported, the operation will fail (as opposed to writing the entire disk with zeros). Thin storage also benefits from trim. List more accurate reason why trim helps flash-memory. Modified: head/sbin/newfs/newfs.8 Modified: head/sbin/newfs/newfs.8 ============================================================================== --- head/sbin/newfs/newfs.8 Fri Jul 7 16:25:58 2017 (r320786) +++ head/sbin/newfs/newfs.8 Fri Jul 7 16:54:18 2017 (r320787) @@ -79,11 +79,9 @@ The following options define the general layout polici .It Fl E Erase the content of the disk before making the filesystem. The reserved area in front of the superblock (for bootcode) will not be erased. -.Pp -This option is only relevant for flash based storage devices that use -wear-leveling algorithms. -.Pp -Erasing may take a long time as it writes to every sector on the disk. +Erasing is only relevant to flash-memory or thinly provisioned devices. +Erasing may take a long time. +If the device does not support BIO_DELETE, the command will fail. .It Fl J Enable journaling on the new file system via gjournal. See @@ -264,9 +262,11 @@ Turn on the TRIM enable flag. If enabled, and if the underlying device supports the BIO_DELETE command, the file system will send a delete request to the underlying device for each freed block. -The trim enable flag is typically set when the underlying device -uses flash-memory as the device can use the delete command to -pre-zero or at least avoid copying blocks that have been deleted. +The trim enable flag is typically set for flash-memory devices to +reduce write amplification which reduces wear on write-limited +flash-memory and often improves long-term performance. +Thinly provisioned storage also benefits by returning unused blocks to +the global pool. .El .Pp The following options override the standard sizes for the disk geometry.