summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-01-12 11:41:01 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-01-12 11:41:01 +0000
commit1b03b8b5af10e84c30a2a8b729f31e3fa9beec7f (patch)
treefbbdb760909aa54a72e6f904465fc6317274f644 /sys
parent536d7f5f104466098a3cdacf440b8bcf17cf109f (diff)
Remove the "doclusterread" and "doclusterwrite" buttons.
Cluster read is unconditionnally enabled for FFS since some years and toggling "doclusterread" has no effect. OpenBSD no longer support write clustering since the Dynamic Buffer Cache went in, so there is reason to delay the call to bawrite(9). Tested by Mathieu, ok dlg@
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ffs/ffs_extern.h6
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c9
-rw-r--r--sys/ufs/ffs/ffs_vnops.c13
3 files changed, 8 insertions, 20 deletions
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h
index 67040d2eec6..85aa2c30466 100644
--- a/sys/ufs/ffs/ffs_extern.h
+++ b/sys/ufs/ffs/ffs_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_extern.h,v 1.40 2014/01/25 23:31:12 guenther Exp $ */
+/* $OpenBSD: ffs_extern.h,v 1.41 2016/01/12 11:41:00 mpi Exp $ */
/* $NetBSD: ffs_extern.h,v 1.4 1996/02/09 22:22:22 christos Exp $ */
/*
@@ -55,8 +55,8 @@
#define FFS_NAMES { \
{ 0, 0 }, \
- { "doclusterread", CTLTYPE_INT }, \
- { "doclusterwrite", CTLTYPE_INT }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
{ "doreallocblks", CTLTYPE_INT }, \
{ "doasyncfree", CTLTYPE_INT }, \
{ "max_softdeps", CTLTYPE_INT }, \
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 03b157769aa..3af23ab49ae 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.149 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.150 2016/01/12 11:41:00 mpi Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -1496,7 +1496,7 @@ int
ffs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
size_t newlen, struct proc *p)
{
- extern int doclusterread, doclusterwrite, doreallocblks, doasyncfree;
+ extern int doreallocblks, doasyncfree;
#ifdef FFS_SOFTUPDATES
extern int max_softdeps, tickdelay, stat_worklist_push;
extern int stat_blk_limit_push, stat_ino_limit_push, stat_blk_limit_hit;
@@ -1510,11 +1510,8 @@ ffs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
switch (name[0]) {
case FFS_CLUSTERREAD:
- return (sysctl_int(oldp, oldlenp, newp, newlen,
- &doclusterread));
case FFS_CLUSTERWRITE:
- return (sysctl_int(oldp, oldlenp, newp, newlen,
- &doclusterwrite));
+ return (EOPNOTSUPP);
case FFS_REALLOCBLKS:
return (sysctl_int(oldp, oldlenp, newp, newlen,
&doreallocblks));
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 69cec454550..730c74699d8 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vnops.c,v 1.80 2015/03/14 03:38:52 jsg Exp $ */
+/* $OpenBSD: ffs_vnops.c,v 1.81 2016/01/12 11:41:00 mpi Exp $ */
/* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */
/*
@@ -180,12 +180,6 @@ struct vops ffs_fifovops = {
#endif /* FIFO */
/*
- * Enabling cluster read/write operations.
- */
-int doclusterread = 1;
-int doclusterwrite = 1;
-
-/*
* Vnode op for reading.
*/
int
@@ -381,10 +375,7 @@ ffs_write(void *v)
if (ioflag & IO_SYNC)
(void)bwrite(bp);
else if (xfersize + blkoffset == fs->fs_bsize) {
- if (doclusterwrite)
- cluster_write(bp, &ip->i_ci, DIP(ip, size));
- else
- bawrite(bp);
+ bawrite(bp);
} else
bdwrite(bp);