Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs revert the code to expand putpage requests to bl...
details: https://anonhg.NetBSD.org/src/rev/690e729e2ca2
branches: trunk
changeset: 584118:690e729e2ca2
user: yamt <yamt%NetBSD.org@localhost>
date: Fri Sep 09 15:00:39 2005 +0000
description:
revert the code to expand putpage requests to block boundary.
because:
- it was incomplete in some cases.
- it can confuse pagedaemon.
see PR/15364 for details.
diffstat:
sys/ufs/ffs/ffs_extern.h | 3 +-
sys/ufs/ffs/ffs_vnops.c | 58 ++---------------------------------------------
2 files changed, 4 insertions(+), 57 deletions(-)
diffs (103 lines):
diff -r 203380c92cd0 -r 690e729e2ca2 sys/ufs/ffs/ffs_extern.h
--- a/sys/ufs/ffs/ffs_extern.h Fri Sep 09 14:50:58 2005 +0000
+++ b/sys/ufs/ffs/ffs_extern.h Fri Sep 09 15:00:39 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_extern.h,v 1.44 2005/08/28 19:37:59 thorpej Exp $ */
+/* $NetBSD: ffs_extern.h,v 1.45 2005/09/09 15:00:39 yamt Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -155,7 +155,6 @@
int ffs_fsync(void *);
int ffs_reclaim(void *);
int ffs_getpages(void *);
-int ffs_putpages(void *);
void ffs_gop_size(struct vnode *, off_t, off_t *, int);
int ffs_openextattr(void *);
int ffs_closeextattr(void *);
diff -r 203380c92cd0 -r 690e729e2ca2 sys/ufs/ffs/ffs_vnops.c
--- a/sys/ufs/ffs/ffs_vnops.c Fri Sep 09 14:50:58 2005 +0000
+++ b/sys/ufs/ffs/ffs_vnops.c Fri Sep 09 15:00:39 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vnops.c,v 1.74 2005/08/30 22:01:12 xtraeme Exp $ */
+/* $NetBSD: ffs_vnops.c,v 1.75 2005/09/09 15:00:39 yamt Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.74 2005/08/30 22:01:12 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.75 2005/09/09 15:00:39 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -116,7 +116,7 @@
{ &vop_update_desc, ffs_update }, /* update */
{ &vop_bwrite_desc, vn_bwrite }, /* bwrite */
{ &vop_getpages_desc, ffs_getpages }, /* getpages */
- { &vop_putpages_desc, ffs_putpages }, /* putpages */
+ { &vop_putpages_desc, genfs_putpages }, /* putpages */
{ &vop_openextattr_desc, ffs_openextattr }, /* openextattr */
{ &vop_closeextattr_desc, ffs_closeextattr }, /* closeextattr */
{ &vop_getextattr_desc, ffs_getextattr }, /* getextattr */
@@ -553,58 +553,6 @@
return genfs_getpages(v);
}
-int
-ffs_putpages(void *v)
-{
- struct vop_putpages_args /* {
- struct vnode *a_vp;
- voff_t a_offlo;
- voff_t a_offhi;
- int a_flags;
- } */ *ap = v;
- struct vnode *vp = ap->a_vp;
- struct uvm_object *uobj = &vp->v_uobj;
- struct inode *ip = VTOI(vp);
- struct fs *fs = ip->i_fs;
- struct vm_page *pg;
- off_t off;
-
- if (!DOINGSOFTDEP(vp) || (ap->a_flags & PGO_CLEANIT) == 0) {
- return genfs_putpages(v);
- }
-
- /*
- * for softdep files, force the pages in a block to be written together.
- * if we're the pagedaemon and we would have to wait for other pages,
- * just fail the request. the pagedaemon will pick a different page.
- */
-
- ap->a_offlo &= ~fs->fs_qbmask;
- ap->a_offhi = blkroundup(fs, ap->a_offhi);
- if (curproc == uvm.pagedaemon_proc) {
- for (off = ap->a_offlo; off < ap->a_offhi; off += PAGE_SIZE) {
- pg = uvm_pagelookup(uobj, off);
-
- /*
- * we only have missing pages here because the
- * calculation of offhi above doesn't account for
- * fragments. so once we see one missing page,
- * the rest should be missing as well, but we'll
- * check for the rest just to be paranoid.
- */
-
- if (pg == NULL) {
- continue;
- }
- if (pg->flags & PG_BUSY) {
- simple_unlock(&uobj->vmobjlock);
- return EBUSY;
- }
- }
- }
- return genfs_putpages(v);
-}
-
/*
* Return the last logical file offset that should be written for this file
* if we're doing a write that ends at "size".
Home |
Main Index |
Thread Index |
Old Index