From: Sascha Wildner Date: Thu, 20 Oct 2011 04:30:42 +0000 (+0200) Subject: Some cleanup after addition of TRIM support. X-Git-Url: https://gitweb.dragonflybsd.org/~lentferj/dragonfly.git/commitdiff_plain/7b8c2c90c660038574b21f6b202a31a3b2baac05 Some cleanup after addition of TRIM support. * Remove unused -R option in newfs(8). * Miscellaneous small cosmetics. --- diff --git a/sbin/fdisk/fdisk.8 b/sbin/fdisk/fdisk.8 index c2930debec..8d52c3164b 100644 --- a/sbin/fdisk/fdisk.8 +++ b/sbin/fdisk/fdisk.8 @@ -1,7 +1,6 @@ .\" $FreeBSD: src/sbin/i386/fdisk/fdisk.8,v 1.17.2.11 2002/04/25 16:25:12 trhodes Exp $ -.\" $DragonFly: src/sbin/i386/fdisk/fdisk.8,v 1.17 2008/09/01 20:13:32 thomas Exp $ .\" -.Dd September 1, 2008 +.Dd October 7, 2011 .Dt FDISK 8 .Os .Sh NAME @@ -9,7 +8,7 @@ .Nd PC slice table (MBR) maintenance program .Sh SYNOPSIS .Nm -.Op Fl BCIaistu +.Op Fl BCEIaistu .Op Fl b Ar bootcode .Op Fl p Ar diskimage .Op Fl 1234 @@ -90,10 +89,11 @@ This typically causes BIOSes to properly detect that the disk should be put in Large mode. This option may be needed on very old PCs. .It Fl E -Use TRIM to erase the device/partition before creating the file system. The -underlying device must have the Trim sysctl enabled. Only devices that -support TRIM will have such a sysctl option (kern.cam.da.X.trim_enabled). For -use with the +Use TRIM to erase the device/partition before creating the file system. +The underlying device must have the TRIM sysctl enabled. +Only devices that support TRIM will have such a sysctl option +.Va ( kern.cam.da.X.trim_enabled ) . +For use with the .Fl I or .Fl u diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index 2ce0c6f7d2..b45a99256c 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -24,7 +24,6 @@ * the rights to redistribute these changes. * * $FreeBSD: /repoman/r/ncvs/src/sbin/i386/fdisk/fdisk.c,v 1.36.2.14 2004/01/30 14:40:47 harti Exp $ - * $DragonFly: src/sbin/i386/fdisk/fdisk.c,v 1.16 2008/04/23 22:09:07 thomas Exp $ */ #include @@ -486,7 +485,7 @@ static void usage(void) { fprintf(stderr, "%s%s", - "usage: fdisk [-BCIaistu] [-b bootcode] [-p diskimage] [-1234] [disk]\n", + "usage: fdisk [-BCEIaistu] [-b bootcode] [-p diskimage] [-1234] [disk]\n", " fdisk -f configfile [-itv] [disk]\n"); exit(1); } diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 index fba3eab86e..75cd03b3fe 100644 --- a/sbin/mount/mount.8 +++ b/sbin/mount/mount.8 @@ -31,9 +31,8 @@ .\" .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD: src/sbin/mount/mount.8,v 1.31.2.12 2003/02/23 21:17:42 trhodes Exp $ -.\" $DragonFly: src/sbin/mount/mount.8,v 1.8 2008/04/23 21:59:22 thomas Exp $ .\" -.Dd June 10, 2009 +.Dd October 7, 2011 .Dt MOUNT 8 .Os .Sh NAME @@ -194,9 +193,13 @@ All .Tn I/O to the file system should be done synchronously. .It Cm trim -If the device supports trim (kern.cam.da.X.trim_enabled exists) and is set, +If the device supports TRIM +.Va ( kern.cam.da.X.trim_enabled +exists) and is set, the file system will perform online trim for corresponding block deletions. -Currently UFS only supports this feature. +Currently, only +.Xr UFS 5 +supports this feature. .It Cm suiddir A directory on the mounted filesystem will respond to the SUID bit being set, by setting the owner of any new files to be the same diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index cee48f3196..fd24e93010 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -31,9 +31,8 @@ .\" .\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 .\" $FreeBSD: src/sbin/newfs/newfs.8,v 1.26.2.15 2003/05/13 12:16:08 joerg Exp $ -.\" $DragonFly: src/sbin/newfs/newfs.8,v 1.7 2007/05/20 19:29:21 dillon Exp $ .\" -.Dd November 24, 2010 +.Dd October 7, 2011 .Dt NEWFS 8 .Os .Sh NAME @@ -43,7 +42,7 @@ .Sh SYNOPSIS .Nm .Op Fl L Ar volname -.Op Fl NCOURE +.Op Fl NCEOU .Op Fl S Ar sector-size .Op Fl T Ar disktype .Op Fl a Ar maxcontig @@ -144,6 +143,11 @@ The following options define the general layout policies: .It Fl T Ar disktype For backward compatibility and for .Nm mount_mfs . +.It Fl E +Use TRIM to erase the device's data before creating the file system. +The underlying device must have the TRIM sysctl enabled. +Only devices that support TRIM will have such a sysctl option +.Va ( kern.cam.da.X.trim_enabled ) . .It Fl F Ar file .Nm Mount_mfs will use this file for the image of the filesystem. When @@ -172,10 +176,6 @@ instead of trying to get geometry information from the storage device. .It Fl U Enables soft updates on the new filesystem. -.It Fl E -Use TRIM to erase the device's data before creating the file system. The -underlying device must have the Trim sysctl enabled. Only devices that support -TRIM will have such a sysctl option (kern.cam.da.X.trim_enabled). .It Fl a Ar maxcontig Specify the maximum number of contiguous blocks that will be laid out before forcing a rotational delay (see the diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 9be2947a8c..aefaa0ea08 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -33,7 +33,6 @@ * @(#) Copyright (c) 1983, 1989, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)newfs.c 8.13 (Berkeley) 5/1/95 * $FreeBSD: src/sbin/newfs/newfs.c,v 1.30.2.9 2003/05/13 12:03:55 joerg Exp $ - * $DragonFly: src/sbin/newfs/newfs.c,v 1.17 2007/06/19 19:18:20 dillon Exp $ */ /* @@ -240,7 +239,7 @@ main(int argc, char **argv) opstring = mfs ? "L:NCF:T:Ua:b:c:d:e:f:g:h:i:m:o:s:v" : - "L:NREOS:T:Ua:b:c:d:e:f:g:h:i:k:l:m:n:o:p:r:s:t:u:vx:"; + "L:NEOS:T:Ua:b:c:d:e:f:g:h:i:k:l:m:n:o:p:r:s:t:u:vx:"; while ((ch = getopt(argc, argv, opstring)) != -1) { switch (ch) { case 'E': @@ -752,7 +751,6 @@ usage(void) fprintf(stderr, "\t-N do not create file system, just print out parameters\n"); fprintf(stderr, "\t-O create a 4.3BSD format filesystem\n"); - fprintf(stderr, "\t-R enable TRIM\n"); fprintf(stderr, "\t-S sector size\n"); #ifdef COMPAT fprintf(stderr, "\t-T disktype\n"); diff --git a/sbin/newfs_hammer/newfs_hammer.8 b/sbin/newfs_hammer/newfs_hammer.8 index 17894262e9..7ce517d3bc 100644 --- a/sbin/newfs_hammer/newfs_hammer.8 +++ b/sbin/newfs_hammer/newfs_hammer.8 @@ -30,8 +30,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $DragonFly: src/sbin/newfs_hammer/newfs_hammer.8,v 1.10 2008/07/27 16:47:19 thomas Exp $ -.Dd April 10, 2011 +.Dd October 7, 2011 .Dt NEWFS_HAMMER 8 .Os .Sh NAME @@ -40,7 +39,7 @@ .Sh SYNOPSIS .Nm .Fl L Ar label -.Op Fl fE +.Op Fl Ef .Op Fl b Ar bootsize .Op Fl m Ar savesize .Op Fl u Ar undosize @@ -120,9 +119,10 @@ file system less than 10GB size or with less than 500MB UNDO/REDO FIFO. This should not be used under normal circumstances. .It Fl E -Use TRIM to erase the device's data before creating the file system. The -underlying device must have the Trim sysctl enabled. Only devices that support -TRIM will have such a sysctl option (kern.cam.da.X.trim_enabled). +Use TRIM to erase the device's data before creating the file system. +The underlying device must have the TRIM sysctl enabled. +Only devices that support TRIM will have such a sysctl option +.Va ( kern.cam.da.X.trim_enabled ) . .It Fl m Ar savesize Specify a fixed area which .Nm HAMMER diff --git a/sbin/newfs_hammer/newfs_hammer.c b/sbin/newfs_hammer/newfs_hammer.c index 87f854417a..a1571dd70d 100644 --- a/sbin/newfs_hammer/newfs_hammer.c +++ b/sbin/newfs_hammer/newfs_hammer.c @@ -30,8 +30,6 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $DragonFly: src/sbin/newfs_hammer/newfs_hammer.c,v 1.44 2008/08/21 23:32:27 thomas Exp $ */ #include "newfs_hammer.h" @@ -302,7 +300,7 @@ void usage(void) { fprintf(stderr, - "usage: newfs_hammer -L label [-fE] [-b bootsize] [-m savesize] [-u undosize]\n" + "usage: newfs_hammer -L label [-Ef] [-b bootsize] [-m savesize] [-u undosize]\n" " [-V version] special ...\n" ); exit(1);