summaryrefslogtreecommitdiffstats
path: root/xlators/mount
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2009-10-28 05:40:12 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-28 06:40:32 -0700
commitef7524ec1eda990cb89bee06eff2ef2d7c49d0d2 (patch)
tree6670a1970074bcec1c1223362a7b4e8f22908b55 /xlators/mount
parent1f4e97c01a8483e227e9e66d421302b4114decd1 (diff)
fuse: use postbuf in truncate_cbk for attributes to return
this causes a problem where inodes even after truncate show old file size for a short time (till attributes are expired in fuse kernel module) Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 146 (Add setattr FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=146
Diffstat (limited to 'xlators/mount')
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 18e51a7faff..b8a91fa0ad0 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -673,7 +673,7 @@ fuse_forget (xlator_t *this, fuse_in_header_t *finh, void *msg)
static int
fuse_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct stat *buf,
+ int32_t op_ret, int32_t op_errno, struct stat *prebuf,
struct stat *postbuf)
{
fuse_state_t *state;
@@ -690,12 +690,12 @@ fuse_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
"%"PRIu64": %s() %s => %"PRId64, frame->root->unique,
gf_fop_list[frame->root->op],
state->loc.path ? state->loc.path : "ERR",
- buf->st_ino);
+ prebuf->st_ino);
/* TODO: make these timeouts configurable via meta */
/* TODO: what if the inode number has changed by now */
- buf->st_blksize = this->ctx->page_size;
- stat2attr (buf, &fao.attr);
+ postbuf->st_blksize = this->ctx->page_size;
+ stat2attr (postbuf, &fao.attr);
fao.attr_valid = calc_timeout_sec (priv->attribute_timeout);
fao.attr_valid_nsec =