From 75b714ac11c006f57a52cdfcfdb93fe6a0093549 Mon Sep 17 00:00:00 2001 From: KATO Takenori Date: Sat, 27 Sep 1997 13:44:17 +0000 Subject: [PATCH] Add noclusterr and noclusterw options. The noclusterr and noclusterw disable clustered read and write, respectively. Reviewed by: bde --- sbin/mount/mntopts.h | 8 ++++++-- sbin/mount/mount.8 | 6 +++++- sbin/mount/mount.c | 8 +++++++- sbin/mount_ifs/mntopts.h | 8 ++++++-- sbin/mount_ifs/mount.8 | 6 +++++- sbin/mount_ifs/mount.c | 8 +++++++- 6 files changed, 36 insertions(+), 8 deletions(-) diff --git a/sbin/mount/mntopts.h b/sbin/mount/mntopts.h index 38daf7fccb2d..5175070287bb 100644 --- a/sbin/mount/mntopts.h +++ b/sbin/mount/mntopts.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mntopts.h 8.7 (Berkeley) 3/29/95 - * $Id: mntopts.h,v 1.9 1997/08/24 21:02:48 steve Exp $ + * $Id: mntopts.h,v 1.10 1997/08/25 21:02:21 bde Exp $ */ struct mntopt { @@ -52,6 +52,8 @@ struct mntopt { #define MOPT_UNION { "union", 0, MNT_UNION, 0 } #define MOPT_USERQUOTA { "userquota", 0, 0, 0 } #define MOPT_GROUPQUOTA { "groupquota", 0, 0, 0 } +#define MOPT_NOCLUSTERR { "clusterr", 1, MNT_NOCLUSTERR, 0 } +#define MOPT_NOCLUSTERW { "clusterw", 1, MNT_NOCLUSTERW, 0 } /* Control flags. */ #define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } @@ -77,7 +79,9 @@ struct mntopt { MOPT_NOEXEC, \ MOPT_NOSUID, \ MOPT_RDONLY, \ - MOPT_UNION + MOPT_UNION, \ + MOPT_NOCLUSTERR, \ + MOPT_NOCLUSTERW void getmntopts __P((const char *, const struct mntopt *, int *, int *)); extern int getmnt_silent; diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 index 4468340ad69d..bda4ad11de20 100644 --- a/sbin/mount/mount.8 +++ b/sbin/mount/mount.8 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 -.\" $Id: mount.8,v 1.17 1997/08/24 17:51:12 joerg Exp $ +.\" $Id: mount.8,v 1.18 1997/08/24 21:02:48 steve Exp $ .\" .Dd June 16, 1994 .Dt MOUNT 8 @@ -128,6 +128,10 @@ filesystems. This filesystem should be skipped when mount is run with the .Fl a flag. +.It noclusterr +Disable read clustering. +.It noclusterw +Disable write clustering. .It nodev Do not interpret character or block special devices on the file system. This option is useful for a server that has file systems containing diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index bc1c8f43c6f1..c9b23acab5e0 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95"; #else static const char rcsid[] = - "$Id$"; + "$Id: mount.c,v 1.19 1997/08/24 21:02:49 steve Exp $"; #endif #endif /* not lint */ @@ -95,6 +95,8 @@ static struct opt { { MNT_RDONLY, "read-only" }, { MNT_SYNCHRONOUS, "synchronous" }, { MNT_UNION, "union" }, + { MNT_NOCLUSTERR, "noclusterr" }, + { MNT_NOCLUSTERW, "noclusterw" }, { NULL } }; @@ -595,6 +597,10 @@ putfsent(ent) printf(",async"); if (ent->f_flags & MNT_NOATIME) printf(",noatime"); + if (ent->f_flags & MNT_NOCLUSTERR) + printf(",noclusterr"); + if (ent->f_flags & MNT_NOCLUSTERW) + printf(",noclusterw"); if ((fst = getfsspec(ent->f_mntfromname))) printf("\t%u %u\n", fst->fs_freq, fst->fs_passno); diff --git a/sbin/mount_ifs/mntopts.h b/sbin/mount_ifs/mntopts.h index 38daf7fccb2d..5175070287bb 100644 --- a/sbin/mount_ifs/mntopts.h +++ b/sbin/mount_ifs/mntopts.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mntopts.h 8.7 (Berkeley) 3/29/95 - * $Id: mntopts.h,v 1.9 1997/08/24 21:02:48 steve Exp $ + * $Id: mntopts.h,v 1.10 1997/08/25 21:02:21 bde Exp $ */ struct mntopt { @@ -52,6 +52,8 @@ struct mntopt { #define MOPT_UNION { "union", 0, MNT_UNION, 0 } #define MOPT_USERQUOTA { "userquota", 0, 0, 0 } #define MOPT_GROUPQUOTA { "groupquota", 0, 0, 0 } +#define MOPT_NOCLUSTERR { "clusterr", 1, MNT_NOCLUSTERR, 0 } +#define MOPT_NOCLUSTERW { "clusterw", 1, MNT_NOCLUSTERW, 0 } /* Control flags. */ #define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } @@ -77,7 +79,9 @@ struct mntopt { MOPT_NOEXEC, \ MOPT_NOSUID, \ MOPT_RDONLY, \ - MOPT_UNION + MOPT_UNION, \ + MOPT_NOCLUSTERR, \ + MOPT_NOCLUSTERW void getmntopts __P((const char *, const struct mntopt *, int *, int *)); extern int getmnt_silent; diff --git a/sbin/mount_ifs/mount.8 b/sbin/mount_ifs/mount.8 index 4468340ad69d..bda4ad11de20 100644 --- a/sbin/mount_ifs/mount.8 +++ b/sbin/mount_ifs/mount.8 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 -.\" $Id: mount.8,v 1.17 1997/08/24 17:51:12 joerg Exp $ +.\" $Id: mount.8,v 1.18 1997/08/24 21:02:48 steve Exp $ .\" .Dd June 16, 1994 .Dt MOUNT 8 @@ -128,6 +128,10 @@ filesystems. This filesystem should be skipped when mount is run with the .Fl a flag. +.It noclusterr +Disable read clustering. +.It noclusterw +Disable write clustering. .It nodev Do not interpret character or block special devices on the file system. This option is useful for a server that has file systems containing diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c index bc1c8f43c6f1..c9b23acab5e0 100644 --- a/sbin/mount_ifs/mount.c +++ b/sbin/mount_ifs/mount.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95"; #else static const char rcsid[] = - "$Id$"; + "$Id: mount.c,v 1.19 1997/08/24 21:02:49 steve Exp $"; #endif #endif /* not lint */ @@ -95,6 +95,8 @@ static struct opt { { MNT_RDONLY, "read-only" }, { MNT_SYNCHRONOUS, "synchronous" }, { MNT_UNION, "union" }, + { MNT_NOCLUSTERR, "noclusterr" }, + { MNT_NOCLUSTERW, "noclusterw" }, { NULL } }; @@ -595,6 +597,10 @@ putfsent(ent) printf(",async"); if (ent->f_flags & MNT_NOATIME) printf(",noatime"); + if (ent->f_flags & MNT_NOCLUSTERR) + printf(",noclusterr"); + if (ent->f_flags & MNT_NOCLUSTERW) + printf(",noclusterw"); if ((fst = getfsspec(ent->f_mntfromname))) printf("\t%u %u\n", fst->fs_freq, fst->fs_passno);