Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/ufs/ffs Pull up following revision(s) (requested by y...
details: https://anonhg.NetBSD.org/src/rev/5c4f8ac78128
branches: netbsd-3
changeset: 577380:5c4f8ac78128
user: tron <tron%NetBSD.org@localhost>
date: Fri Oct 21 11:25:56 2005 +0000
description:
Pull up following revision(s) (requested by yamt in ticket #845):
sys/ufs/ffs/ffs_extern.h: revision 1.45 via patch
sys/ufs/ffs/ffs_vnops.c: revision 1.75 via patch
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 74844fa7fcdf -r 5c4f8ac78128 sys/ufs/ffs/ffs_extern.h
--- a/sys/ufs/ffs/ffs_extern.h Sat Oct 15 22:03:03 2005 +0000
+++ b/sys/ufs/ffs/ffs_extern.h Fri Oct 21 11:25:56 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_extern.h,v 1.42 2005/02/26 22:32:20 perry Exp $ */
+/* $NetBSD: ffs_extern.h,v 1.42.2.1 2005/10/21 11:25:56 tron Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -151,7 +151,6 @@
int ffs_fsync __P((void *));
int ffs_reclaim __P((void *));
int ffs_getpages __P((void *));
-int ffs_putpages __P((void *));
void ffs_gop_size __P((struct vnode *, off_t, off_t *, int));
#ifdef SYSCTL_SETUP_PROTO
diff -r 74844fa7fcdf -r 5c4f8ac78128 sys/ufs/ffs/ffs_vnops.c
--- a/sys/ufs/ffs/ffs_vnops.c Sat Oct 15 22:03:03 2005 +0000
+++ b/sys/ufs/ffs/ffs_vnops.c Fri Oct 21 11:25:56 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vnops.c,v 1.69.2.1 2005/08/24 18:43:37 riz Exp $ */
+/* $NetBSD: ffs_vnops.c,v 1.69.2.2 2005/10/21 11:25:56 tron Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.69.2.1 2005/08/24 18:43:37 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vnops.c,v 1.69.2.2 2005/10/21 11:25:56 tron 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 */
{ NULL, NULL }
};
const struct vnodeopv_desc ffs_vnodeop_opv_desc =
@@ -538,58 +538,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