Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ext2fs Use buffer cache, not page cache, to expand d...



details:   https://anonhg.NetBSD.org/src/rev/975ea113d984
branches:  trunk
changeset: 342869:975ea113d984
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Jan 12 21:29:29 2016 +0000

description:
Use buffer cache, not page cache, to expand directories in ext2fs.

Candidate fix for PR kern/50607, PR port-evbmips/50059.

Formerly VOP_WRITE-->ext2fs_write would automatically dispatch to
this code path for writes to directories, but I broke that in
ext2fs_lookup.c rev. 1.78 when disentangling page-cached and
buffer-cached writes.

This was not a problem in ufs, and I didn't notice it in ext2fs,
because ufs consistently used buffercache(9) directly instead of
using VOP_WRITE sometimes as ext2fs did.

diffstat:

 sys/ufs/ext2fs/ext2fs_lookup.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r dbd59efd4158 -r 975ea113d984 sys/ufs/ext2fs/ext2fs_lookup.c
--- a/sys/ufs/ext2fs/ext2fs_lookup.c    Tue Jan 12 19:50:28 2016 +0000
+++ b/sys/ufs/ext2fs/ext2fs_lookup.c    Tue Jan 12 21:29:29 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ext2fs_lookup.c,v 1.78 2015/03/27 17:27:56 riastradh Exp $     */
+/*     $NetBSD: ext2fs_lookup.c,v 1.79 2016/01/12 21:29:29 riastradh Exp $     */
 
 /*
  * Modified for NetBSD 1.2E
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_lookup.c,v 1.78 2015/03/27 17:27:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_lookup.c,v 1.79 2016/01/12 21:29:29 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -768,7 +768,7 @@
                auio.uio_iovcnt = 1;
                auio.uio_rw = UIO_WRITE;
                UIO_SETUP_SYSSPACE(&auio);
-               error = VOP_WRITE(dvp, &auio, IO_SYNC, cnp->cn_cred);
+               error = ext2fs_bufwr(dvp, &auio, IO_SYNC, cnp->cn_cred);
                if (dirblksiz > dvp->v_mount->mnt_stat.f_bsize)
                        /* XXX should grow with balloc() */
                        panic("ext2fs_direnter: frag size");



Home | Main Index | Thread Index | Old Index