Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/fs/puffs Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/72f53fff78a1
branches:  netbsd-6
changeset: 776751:72f53fff78a1
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Nov 03 19:42:33 2014 +0000

description:
Pull up following revision(s) (requested by manu in ticket #1149):
        sys/fs/puffs/puffs_node.c: revision 1.33
        sys/fs/puffs/puffs_vnops.c: revision 1.185
When changing a directory content, update the ctime/mtime in kernel
cache,
otherwise the updated ctime/mtime appears after the cached entry expire.

diffstat:

 sys/fs/puffs/puffs_node.c  |   6 ++++--
 sys/fs/puffs/puffs_vnops.c |  19 ++++++++++++++++---
 2 files changed, 20 insertions(+), 5 deletions(-)

diffs (89 lines):

diff -r c591a85cce6f -r 72f53fff78a1 sys/fs/puffs/puffs_node.c
--- a/sys/fs/puffs/puffs_node.c Mon Nov 03 19:40:10 2014 +0000
+++ b/sys/fs/puffs/puffs_node.c Mon Nov 03 19:42:33 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: puffs_node.c,v 1.23.2.2 2012/08/12 12:59:50 martin Exp $       */
+/*     $NetBSD: puffs_node.c,v 1.23.2.3 2014/11/03 19:42:33 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_node.c,v 1.23.2.2 2012/08/12 12:59:50 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_node.c,v 1.23.2.3 2014/11/03 19:42:33 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/hash.h>
@@ -249,6 +249,8 @@
        if (PUFFS_USE_NAMECACHE(pmp))
                cache_enter(dvp, vp, cnp);
 
+       puffs_updatenode(VPTOPP(dvp), PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0);
+
        return 0;
 }
 
diff -r c591a85cce6f -r 72f53fff78a1 sys/fs/puffs/puffs_vnops.c
--- a/sys/fs/puffs/puffs_vnops.c        Mon Nov 03 19:40:10 2014 +0000
+++ b/sys/fs/puffs/puffs_vnops.c        Mon Nov 03 19:42:33 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: puffs_vnops.c,v 1.163.2.5 2014/11/03 19:18:09 msaitoh Exp $    */
+/*     $NetBSD: puffs_vnops.c,v 1.163.2.6 2014/11/03 19:42:33 msaitoh Exp $    */
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.163.2.5 2014/11/03 19:18:09 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.163.2.6 2014/11/03 19:42:33 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -1799,6 +1799,8 @@
 
        PUFFS_MSG_RELEASE(remove);
 
+       puffs_updatenode(VPTOPP(dvp), PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0);
+
        RELEPN_AND_VP(dvp, dpn);
        RELEPN_AND_VP(vp, pn);
 
@@ -1917,6 +1919,8 @@
 
        PUFFS_MSG_RELEASE(rmdir);
 
+       puffs_updatenode(VPTOPP(dvp), PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0);
+
        /* XXX: some call cache_purge() *for both vnodes* here, investigate */
        RELEPN_AND_VP(dvp, dpn);
        RELEPN_AND_VP(vp, pn);
@@ -1962,8 +1966,11 @@
         * XXX: stay in touch with the cache.  I don't like this, but
         * don't have a better solution either.  See also puffs_rename().
         */
-       if (error == 0)
+       if (error == 0) {
                puffs_updatenode(pn, PUFFS_UPDATECTIME, 0);
+               puffs_updatenode(VPTOPP(dvp),
+                                PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0);
+       }
 
        RELEPN_AND_VP(dvp, dpn);
        puffs_releasenode(pn);
@@ -2129,6 +2136,12 @@
         */
        if (error == 0) {
                puffs_updatenode(fpn, PUFFS_UPDATECTIME, 0);
+               puffs_updatenode(VPTOPP(fdvp),
+                                PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0);
+               if (fdvp != tdvp)
+                       puffs_updatenode(VPTOPP(tdvp),
+                                        PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME,
+                                        0);
 
                if (PUFFS_USE_DOTDOTCACHE(pmp) &&
                    (VPTOPP(fvp)->pn_parent != tdvp))



Home | Main Index | Thread Index | Old Index