Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/fs/puffs Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/1e4265090640
branches: netbsd-7
changeset: 798332:1e4265090640
user: martin <martin%NetBSD.org@localhost>
date: Wed Sep 10 08:42:28 2014 +0000
description:
Pull up following revision(s) (requested by manu in ticket #79):
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 9b2f1fbc33aa -r 1e4265090640 sys/fs/puffs/puffs_node.c
--- a/sys/fs/puffs/puffs_node.c Wed Sep 10 08:38:31 2014 +0000
+++ b/sys/fs/puffs/puffs_node.c Wed Sep 10 08:42:28 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_node.c,v 1.31.4.1 2014/08/29 11:55:34 martin Exp $ */
+/* $NetBSD: puffs_node.c,v 1.31.4.2 2014/09/10 08:42:28 martin 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.31.4.1 2014/08/29 11:55:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_node.c,v 1.31.4.2 2014/09/10 08:42:28 martin Exp $");
#include <sys/param.h>
#include <sys/hash.h>
@@ -180,6 +180,8 @@
cache_enter(dvp, *vpp, cnp->cn_nameptr, cnp->cn_namelen,
cnp->cn_flags);
+ puffs_updatenode(VPTOPP(dvp), PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0);
+
return 0;
}
diff -r 9b2f1fbc33aa -r 1e4265090640 sys/fs/puffs/puffs_vnops.c
--- a/sys/fs/puffs/puffs_vnops.c Wed Sep 10 08:38:31 2014 +0000
+++ b/sys/fs/puffs/puffs_vnops.c Wed Sep 10 08:42:28 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_vnops.c,v 1.182.2.2 2014/08/29 11:55:34 martin Exp $ */
+/* $NetBSD: puffs_vnops.c,v 1.182.2.3 2014/09/10 08:42:28 martin 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.182.2.2 2014/08/29 11:55:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.182.2.3 2014/09/10 08:42:28 martin Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -1805,6 +1805,8 @@
PUFFS_MSG_RELEASE(remove);
+ puffs_updatenode(VPTOPP(dvp), PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0);
+
RELEPN_AND_VP(dvp, dpn);
RELEPN_AND_VP(vp, pn);
@@ -1922,6 +1924,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);
@@ -1967,8 +1971,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);
@@ -2133,6 +2140,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