Module Name: src
Committed By: jdc
Date: Tue Jun 5 16:25:24 UTC 2012
Modified Files:
src/lib/libperfuse [netbsd-6]: ops.c
Log Message:
Pull up revision 1.55 (requested by manu in ticket #290).
Setting mode by fchmod(2) will break on glusterfs-3.3 is we attempt
to set atime and mtime at the same time. Detect that situation just
like we detected ftruncate(2) and wipe atime and mtime if it occurs.
To generate a diff of this commit:
cvs rdiff -u -r1.50.2.2 -r1.50.2.3 src/lib/libperfuse/ops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.50.2.2 src/lib/libperfuse/ops.c:1.50.2.3
--- src/lib/libperfuse/ops.c:1.50.2.2 Mon Apr 23 16:48:59 2012
+++ src/lib/libperfuse/ops.c Tue Jun 5 16:25:24 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ops.c,v 1.50.2.2 2012/04/23 16:48:59 riz Exp $ */
+/* $NetBSD: ops.c,v 1.50.2.3 2012/06/05 16:25:24 jdc Exp $ */
/*-
* Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -1849,6 +1849,19 @@ perfuse_node_setattr_ttl(struct puffs_us
fsi->mtimensec = 0;
fsi->valid &= ~(FUSE_FATTR_ATIME|FUSE_FATTR_MTIME);
}
+
+ /*
+ * There is the same mess with fchmod()
+ */
+ if ((vap->va_mode != (mode_t)PUFFS_VNOVAL) &&
+ (vap->va_uid == (uid_t)PUFFS_VNOVAL) &&
+ (vap->va_gid == (gid_t)PUFFS_VNOVAL)) {
+ fsi->atime = 0;
+ fsi->atimensec = 0;
+ fsi->mtime = 0;
+ fsi->mtimensec = 0;
+ fsi->valid &= ~(FUSE_FATTR_ATIME|FUSE_FATTR_MTIME);
+ }
/*
* If nothing remain, discard the operation.