Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/mount_lfs Add -i option, it's just the same than -f in ...



details:   https://anonhg.NetBSD.org/src/rev/1ca956cad02e
branches:  trunk
changeset: 579900:1ca956cad02e
user:      xtraeme <xtraeme%NetBSD.org@localhost>
date:      Thu Mar 31 03:07:38 2005 +0000

description:
Add -i option, it's just the same than -f in lfs_cleanerd(8), ok'ed
thorpej@.

diffstat:

 sbin/mount_lfs/mount_lfs.8 |   7 +++++--
 sbin/mount_lfs/mount_lfs.c |  17 +++++++++++------
 2 files changed, 16 insertions(+), 8 deletions(-)

diffs (101 lines):

diff -r 036278e9b349 -r 1ca956cad02e sbin/mount_lfs/mount_lfs.8
--- a/sbin/mount_lfs/mount_lfs.8        Thu Mar 31 02:34:10 2005 +0000
+++ b/sbin/mount_lfs/mount_lfs.8        Thu Mar 31 03:07:38 2005 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: mount_lfs.8,v 1.13 2005/01/31 05:19:19 erh Exp $
+.\"    $NetBSD: mount_lfs.8,v 1.14 2005/03/31 03:07:38 xtraeme Exp $
 .\"
 .\" Copyright (c) 1993, 1994
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"    @(#)mount_lfs.8 8.5 (Berkeley) 3/30/94
 .\"
-.Dd March 30, 1994
+.Dd March 31, 2005
 .Dt MOUNT_LFS 8
 .Os
 .Sh NAME
@@ -71,6 +71,9 @@
 Run
 .Xr lfs_cleanerd 8
 in debug mode.
+.It Fl i
+Instruct the cleaner to use filesystem idle time as the criterion
+for aggressive cleaning, instead of system load.
 .It Fl o
 Options are specified with a
 .Fl o
diff -r 036278e9b349 -r 1ca956cad02e sbin/mount_lfs/mount_lfs.c
--- a/sbin/mount_lfs/mount_lfs.c        Thu Mar 31 02:34:10 2005 +0000
+++ b/sbin/mount_lfs/mount_lfs.c        Thu Mar 31 03:07:38 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mount_lfs.c,v 1.22 2005/02/09 14:31:29 xtraeme Exp $   */
+/*     $NetBSD: mount_lfs.c,v 1.23 2005/03/31 03:07:38 xtraeme Exp $   */
 
 /*-
  * Copyright (c) 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)mount_lfs.c        8.4 (Berkeley) 4/26/95";
 #else
-__RCSID("$NetBSD: mount_lfs.c,v 1.22 2005/02/09 14:31:29 xtraeme Exp $");
+__RCSID("$NetBSD: mount_lfs.c,v 1.23 2005/03/31 03:07:38 xtraeme Exp $");
 #endif
 #endif /* not lint */
 
@@ -75,7 +75,7 @@
 static void    kill_daemon(char *);
 static void    kill_cleaner(char *);
 
-static int short_rds, cleaner_debug, cleaner_bytes;
+static int short_rds, cleaner_debug, cleaner_bytes, fs_idle;
 static char *nsegs;
 
 #ifndef MOUNT_NOMAIN
@@ -101,7 +101,7 @@
        nsegs = "4";
        mntflags = noclean = 0;
        cleaner_bytes = 1;
-       while ((ch = getopt(argc, argv, "bdN:no:s")) != -1)
+       while ((ch = getopt(argc, argv, "bdiN:no:s")) != -1)
                switch (ch) {
                case 'b':
                        cleaner_bytes = !cleaner_bytes;
@@ -109,6 +109,9 @@
                case 'd':
                        cleaner_debug = 1;
                        break;
+                case 'i':
+                        fs_idle = 1;
+                        break;
                case 'n':
                        noclean = 1;
                        break;
@@ -252,7 +255,7 @@
 static void
 invoke_cleaner(char *name)
 {
-       char *args[6], **ap = args;
+       char *args[7], **ap = args;
 
        /* Build the argument list. */
        *ap++ = _PATH_LFS_CLEANERD;
@@ -266,6 +269,8 @@
                *ap++ = "-s";
        if (cleaner_debug)
                *ap++ = "-d";
+        if (fs_idle)
+                *ap++ = "-f";
        *ap++ = name;
        *ap = NULL;
 
@@ -277,7 +282,7 @@
 usage(void)
 {
        (void)fprintf(stderr,
-               "usage: %s [-bdns] [-N nsegs] [-o options] special node\n",
+               "usage: %s [-bdins] [-N nsegs] [-o options] special node\n",
                getprogname());
        exit(1);
 }



Home | Main Index | Thread Index | Old Index