Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpvfs Allow etfs for CREATE lookups too. ...



details:   https://anonhg.NetBSD.org/src/rev/868e342da93b
branches:  trunk
changeset: 761618:868e342da93b
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Feb 02 15:58:09 2011 +0000

description:
Allow etfs for CREATE lookups too.  This takes care of O_CREAT calls
to open(), which act just like lookups if the node exists (found
from etfs).  If the node doesn't exist in etfs, nothing changes
from the previous situation.

diffstat:

 sys/rump/librump/rumpvfs/rumpfs.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 5e0b7ad12c06 -r 868e342da93b sys/rump/librump/rumpvfs/rumpfs.c
--- a/sys/rump/librump/rumpvfs/rumpfs.c Wed Feb 02 15:55:22 2011 +0000
+++ b/sys/rump/librump/rumpvfs/rumpfs.c Wed Feb 02 15:58:09 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpfs.c,v 1.90 2011/02/02 14:41:55 pooka Exp $        */
+/*     $NetBSD: rumpfs.c,v 1.91 2011/02/02 15:58:09 pooka Exp $        */
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.90 2011/02/02 14:41:55 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.91 2011/02/02 15:58:09 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -679,7 +679,8 @@
                return EOPNOTSUPP;
 
        /* check for etfs */
-       if (dvp == rootvnode && cnp->cn_nameiop == LOOKUP) {
+       if (dvp == rootvnode &&
+           (cnp->cn_nameiop == LOOKUP || cnp->cn_nameiop == CREATE)) {
                bool found;
                mutex_enter(&etfs_lock);
                found = etfs_find(cnp->cn_nameptr, &et, false);



Home | Main Index | Thread Index | Old Index