mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 12:28:58 +00:00
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>
This commit is contained in:
parent
55ae4cdbde
commit
804f67f778
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28701
@ -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>
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user