From 1e001b99a5dc012647d630bdbb268e8fa9e8edd2 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 7 Jul 2017 16:54:18 +0000 Subject: [PATCH] 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. --- sbin/newfs/newfs.8 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index 01270b5f1b50..eaa3e40fc735 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -79,11 +79,9 @@ The following options define the general layout policies: .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.