diff options
author | kato <kato@FreeBSD.org> | 1997-08-25 08:18:39 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1997-08-25 08:18:39 +0000 |
commit | 53dfbd16d46c66ee81348107a883293267dd891f (patch) | |
tree | 045f0b97eca9b5cc2282391a243958edbd2cac5d /sys | |
parent | 4f0bf4df0d46d1557f180ed1cb6414378f4a366f (diff) | |
download | FreeBSD-src-53dfbd16d46c66ee81348107a883293267dd891f.zip FreeBSD-src-53dfbd16d46c66ee81348107a883293267dd891f.tar.gz |
Renamed doclusterread/write to unique names (ffs_doclusterread/write),
and staticize them. Move the #include of <sys/sysctl.h> to the top of
the file.
Pointed out by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 14 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_readwrite.c | 6 |
2 files changed, 11 insertions, 9 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index c7ecb37..341a428 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_vnops.c 8.15 (Berkeley) 5/14/95 - * $Id: ffs_vnops.c,v 1.24 1997/03/04 18:35:15 bde Exp $ + * $Id: ffs_vnops.c,v 1.25 1997/03/22 06:53:30 bde Exp $ */ #include <sys/param.h> @@ -45,6 +45,7 @@ #include <sys/proc.h> #include <sys/conf.h> #include <sys/mount.h> +#include <sys/sysctl.h> #include <sys/vnode.h> #include <sys/malloc.h> #include <sys/lockf.h> @@ -237,13 +238,14 @@ VNODEOP_SET(ffs_fifoop_opv_desc); /* * Enabling cluster read/write operations. */ -int doclusterread = 1; -int doclusterwrite = 1; +static int ffs_doclusterread = 1; +static int ffs_doclusterwrite = 1; -#include <sys/sysctl.h> SYSCTL_NODE(_vfs, MOUNT_UFS, ffs, CTLFLAG_RW, 0, "FFS filesystem"); -SYSCTL_INT(_vfs_ffs, FFS_CLUSTERREAD, doclusterread, CTLFLAG_RW, &doclusterread, 0, ""); -SYSCTL_INT(_vfs_ffs, FFS_CLUSTERWRITE, doclusterwrite, CTLFLAG_RW, &doclusterwrite, 0, ""); +SYSCTL_INT(_vfs_ffs, FFS_CLUSTERREAD, doclusterread, + CTLFLAG_RW, &ffs_doclusterread, 0, ""); +SYSCTL_INT(_vfs_ffs, FFS_CLUSTERWRITE, doclusterwrite, + CTLFLAG_RW, &ffs_doclusterwrite, 0, ""); #include <ufs/ufs/ufs_readwrite.c> diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c index 91597a1..c598833 100644 --- a/sys/ufs/ufs/ufs_readwrite.c +++ b/sys/ufs/ufs/ufs_readwrite.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufs_readwrite.c 8.11 (Berkeley) 5/8/95 - * $Id: ufs_readwrite.c,v 1.28 1997/03/03 16:23:02 bde Exp $ + * $Id: ufs_readwrite.c,v 1.29 1997/03/22 06:53:44 bde Exp $ */ #ifdef LFS_READWRITE @@ -123,7 +123,7 @@ READ(ap) #else if (lblktosize(fs, nextlbn) >= ip->i_size) error = bread(vp, lbn, size, NOCRED, &bp); - else if (doclusterread) + 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) { @@ -281,7 +281,7 @@ WRITE(ap) if (ioflag & IO_SYNC) { (void)bwrite(bp); } else if (xfersize + blkoffset == fs->fs_bsize) { - if (doclusterwrite) { + if (ffs_doclusterwrite) { bp->b_flags |= B_CLUSTEROK; cluster_write(bp, ip->i_size); } else { |