Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/genfs genfs_{compat_}getpages(): For PGO_LOCKED r...
details: https://anonhg.NetBSD.org/src/rev/5762eb5b64c3
branches: trunk
changeset: 525718:5762eb5b64c3
user: enami <enami%NetBSD.org@localhost>
date: Tue Apr 16 06:05:05 2002 +0000
description:
genfs_{compat_}getpages(): For PGO_LOCKED request, it is safe to return
read only page if it was due to read fault. This avoid many unnecessary
read fault introduced by recent nfs_bio.c change. Reviewed by chuq.
diffstat:
sys/miscfs/genfs/genfs_vnops.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 4051e860f57a -r 5762eb5b64c3 sys/miscfs/genfs/genfs_vnops.c
--- a/sys/miscfs/genfs/genfs_vnops.c Tue Apr 16 06:00:46 2002 +0000
+++ b/sys/miscfs/genfs/genfs_vnops.c Tue Apr 16 06:05:05 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfs_vnops.c,v 1.53 2002/04/16 06:00:46 enami Exp $ */
+/* $NetBSD: genfs_vnops.c,v 1.54 2002/04/16 06:05:05 enami Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.53 2002/04/16 06:00:46 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.54 2002/04/16 06:05:05 enami Exp $");
#include "opt_nfsserver.h"
@@ -497,7 +497,7 @@
if (flags & PGO_LOCKED) {
uvn_findpages(uobj, origoffset, ap->a_count, ap->a_m,
- UFP_NOWAIT|UFP_NOALLOC|UFP_NORDONLY);
+ UFP_NOWAIT|UFP_NOALLOC| (write ? UFP_NORDONLY : 0));
return (ap->a_m[ap->a_centeridx] == NULL ? EBUSY : 0);
}
@@ -1505,7 +1505,7 @@
}
if (ap->a_flags & PGO_LOCKED) {
uvn_findpages(uobj, origoffset, ap->a_count, ap->a_m,
- UFP_NOWAIT|UFP_NOALLOC|UFP_NORDONLY);
+ UFP_NOWAIT|UFP_NOALLOC| (write ? UFP_NORDONLY : 0));
return (ap->a_m[ap->a_centeridx] == NULL ? EBUSY : 0);
}
Home |
Main Index |
Thread Index |
Old Index