Source-Changes-HG archive

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

[src/netbsd-6]: src/lib/libperfuse Pull up revision 1.55 (requested by manu i...



details:   https://anonhg.NetBSD.org/src/rev/ba041f25c02b
branches:  netbsd-6
changeset: 774163:ba041f25c02b
user:      jdc <jdc%NetBSD.org@localhost>
date:      Tue Jun 05 16:25:24 2012 +0000

description:
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.

diffstat:

 lib/libperfuse/ops.c |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r db3a361b893c -r ba041f25c02b lib/libperfuse/ops.c
--- a/lib/libperfuse/ops.c      Tue Jun 05 16:22:23 2012 +0000
+++ b/lib/libperfuse/ops.c      Tue Jun 05 16:25:24 2012 +0000
@@ -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 @@
                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.



Home | Main Index | Thread Index | Old Index