diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-10-05 09:25:33 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-06 07:22:19 -0700 |
commit | bb8ea22c3c936254dc4e3a3813f18b78d1aec6b4 (patch) | |
tree | 7959dbdd2ce96eb26d5587ce315eaad9838de0bc /xlators/mount/fuse/src | |
parent | 29f81133a6cd95ebc9fac627a4fb0da73977f5a8 (diff) |
mount/fuse: Don't send fsetattr if ATIME or MTIME needs to be changed.
There is no "futimes" call. Hence, if either the FATTR_MTIME or FATTR_ATIME
flag is set, don't send fsetattr.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 296 (handle futimes correctly in FUSE)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=296
Diffstat (limited to 'xlators/mount/fuse/src')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 8b97800a92c..b9bf7b94e32 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -1185,7 +1185,14 @@ fuse_setattr (xlator_t *this, fuse_in_header_t *finh, void *msg) attr.st_uid = fsi->uid; attr.st_gid = fsi->gid; - if (state->fd) { + if (state->fd && + !((fsi->valid & FATTR_ATIME) || (fsi->valid & FATTR_MTIME))) { + + /* + there is no "futimes" call, so don't send + fsetattr if ATIME or MTIME is set + */ + FUSE_FOP (state, fuse_setattr_cbk, GF_FOP_FSETATTR, fsetattr, state->fd, &attr, fattr_to_gf_set_attr (fsi->valid)); |