[Bugs] [Bug 1773476] gluster does not return correct filesize and blocksize after ftruncate

bugzilla at redhat.com bugzilla at redhat.com
Thu Nov 28 06:37:31 UTC 2019


Ravishankar N <ravishankar at redhat.com> changed:

           What    |Removed                     |Added
                 CC|                            |rgowdapp at redhat.com
              Flags|needinfo?(zz.sh.cynthia at gma |needinfo?(rgowdapp at redhat.c
                   |il.com)                     |om)

--- Comment #8 from Ravishankar N <ravishankar at redhat.com> ---
(In reply to Ravishankar N from comment #5)

So the reason it is not happening in 3.12.x is because it did not have the
function rda_inode_ctx_update_iatts() introduced by the commit "*c9bde3021 -
performance/readdir-ahead: keep stats of cached dentries in sync with

What is happening is this:
-When consistent-metadata is enabled, afr calls afr_zero_fill_stat() in its
truncate call back and sets ctime and nlink to zero in the postbuf. This
behaviour is already there in glusterfs 3.12  This forces fuse to trigger a
lookup which hits AFR (and thus the bricks) and the application gets the
current ia_size when it does the stat.
-But in the current code-base, when ctime is zero, the function
rda_inode_ctx_update_iatts() zeroes out everything else also in the postbuf
except gfid and ia_type. This somehow is not causing FUSE to trigger a lookup.

Raghavendra, is there some field in the postbuf that we need to retain and not
zero out (in addition to the gfid and ia_type) in rda_inode_ctx_update_iatts()
so that fuse sends a lookup when application does a stat?

You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

More information about the Bugs mailing list