From bb8ea22c3c936254dc4e3a3813f18b78d1aec6b4 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Mon, 5 Oct 2009 09:25:33 +0000 Subject: 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 BUG: 296 (handle futimes correctly in FUSE) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=296 --- xlators/mount/fuse/src/fuse-bridge.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'xlators/mount') diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 8b97800a9..b9bf7b94e 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)); -- cgit