From owner-freebsd-current Thu Sep 25 08:34:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA22694 for current-outgoing; Thu, 25 Sep 1997 08:34:10 -0700 (PDT) Received: from gneiss.eps.nagoya-u.ac.jp (gneiss.eps.nagoya-u.ac.jp [133.6.57.99]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA22684 for ; Thu, 25 Sep 1997 08:33:51 -0700 (PDT) Received: from marble.eps.nagoya-u.ac.jp (localhost [127.0.0.1]) by gneiss.eps.nagoya-u.ac.jp (8.8.7/3.5Wpl3) with ESMTP id AAA07045; Fri, 26 Sep 1997 00:26:11 +0900 (JST) Message-Id: <199709251526.AAA07045@gneiss.eps.nagoya-u.ac.jp> To: bde@zeta.org.au Cc: current@FreeBSD.ORG Subject: Re: Daily SNAPshots at current.freebsd.org shut down for now. From: KATO Takenori In-Reply-To: Your message of "Thu, 25 Sep 1997 23:11:44 +1000" References: <199709251311.XAA16478@godzilla.zeta.org.au> X-Mailer: Mew version 1.70 on Emacs 19.28.1 / Mule 2.3 X-PGP-Fingerprint: 03 72 85 36 62 46 23 03 52 B1 10 22 44 10 0D 9E Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 26 Sep 1997 00:26:11 +0900 Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > The mount option would automatically apply to the correct layer. Ok, I will add preliminary path bellow. > Perhaps the mount-option version should eliminate doclusterread and > doclusterwrite (this requires a mount option for each) and move the > tests into cluster_read() and cluster_write(). I think doclusterreadn and doclusterwrite is useful. IMO, we should not expect every user always mount with correct mount-option. If doclusterread and doclusterwrite can be controled with sysctl and root disables them, non-root user cannot enable them. ---------- BEGIN ---------- *** sys/sys/mount.h.ORIG Thu Sep 25 23:33:00 1997 --- sys/sys/mount.h Fri Sep 26 00:00:35 1997 *************** *** 166,171 **** --- 166,172 ---- #define MNT_UNION 0x00000020 /* union with underlying filesystem */ #define MNT_ASYNC 0x00000040 /* file system written asynchronously */ #define MNT_NOATIME 0x10000000 /* Disable update of file access times */ + #define MNT_NOCLUSTER 0x40000000 /* Disable cluster read and write */ /* * exported mount flags. *** sys/kern/vfs_syscalls.c.ORIG Thu Sep 25 23:57:47 1997 --- sys/kern/vfs_syscalls.c Fri Sep 26 00:01:49 1997 *************** *** 253,262 **** else if (mp->mnt_flag & MNT_RDONLY) mp->mnt_flag |= MNT_WANTRDWR; mp->mnt_flag &=~ (MNT_NOSUID | MNT_NOEXEC | MNT_NODEV | ! MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_NOATIME); mp->mnt_flag |= SCARG(uap, flags) & (MNT_NOSUID | MNT_NOEXEC | MNT_NODEV | MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_FORCE | ! MNT_NOATIME); /* * Mount the filesystem. */ --- 253,263 ---- else if (mp->mnt_flag & MNT_RDONLY) mp->mnt_flag |= MNT_WANTRDWR; mp->mnt_flag &=~ (MNT_NOSUID | MNT_NOEXEC | MNT_NODEV | ! MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_NOATIME | ! MNT_NOCLUSTER); mp->mnt_flag |= SCARG(uap, flags) & (MNT_NOSUID | MNT_NOEXEC | MNT_NODEV | MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_FORCE | ! MNT_NOATIME | MNT_NOCLUSTER); /* * Mount the filesystem. */ *** sys/ufs/ufs/ufs_readwrite.c.ORIG Fri Sep 26 00:18:23 1997 --- sys/ufs/ufs/ufs_readwrite.c Fri Sep 26 00:22:16 1997 *************** *** 123,129 **** #else if (lblktosize(fs, nextlbn) >= ip->i_size) error = bread(vp, lbn, size, NOCRED, &bp); ! else if (ffs_doclusterread) error = cluster_read(vp, ip->i_size, lbn, size, NOCRED, uio->uio_resid, seqcount, &bp); else if (lbn - 1 == vp->v_lastr) { --- 123,130 ---- #else if (lblktosize(fs, nextlbn) >= ip->i_size) error = bread(vp, lbn, size, NOCRED, &bp); ! else if (ffs_doclusterread && ! !(vp->v_mount->mnt_flag & MNT_NOCLUSTER)) error = cluster_read(vp, ip->i_size, lbn, size, NOCRED, uio->uio_resid, seqcount, &bp); else if (lbn - 1 == vp->v_lastr) { *************** *** 281,287 **** if (ioflag & IO_SYNC) { (void)bwrite(bp); } else if (xfersize + blkoffset == fs->fs_bsize) { ! if (ffs_doclusterwrite) { bp->b_flags |= B_CLUSTEROK; cluster_write(bp, ip->i_size); } else { --- 282,289 ---- if (ioflag & IO_SYNC) { (void)bwrite(bp); } else if (xfersize + blkoffset == fs->fs_bsize) { ! if (ffs_doclusterwrite && ! !(vp->v_mount->mnt_flag & MNT_NOCLUSTER)) { bp->b_flags |= B_CLUSTEROK; cluster_write(bp, ip->i_size); } else { ---------- END ---------- ---- KATO Takenori Dept. Earth Planet. Sci., Nagoya Univ., Nagoya, 464-01, Japan PGP public key: finger kato@eclogite.eps.nagoya-u.ac.jp ------------------- Powered by FreeBSD(98) -------------------