Module Name: src
Committed By: manu
Date: Mon May 28 02:13:33 UTC 2012
Modified Files:
src/lib/libperfuse: ops.c
Log Message:
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.54 -r1.55 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.54 src/lib/libperfuse/ops.c:1.55
--- src/lib/libperfuse/ops.c:1.54 Wed Apr 18 00:57:21 2012
+++ src/lib/libperfuse/ops.c Mon May 28 02:13:32 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ops.c,v 1.54 2012/04/18 00:57:21 manu Exp $ */
+/* $NetBSD: ops.c,v 1.55 2012/05/28 02:13:32 manu 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.