diff options
author | Jiffin Tony Thottan <jthottan@redhat.com> | 2016-06-06 18:10:09 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2016-06-07 04:37:44 -0700 |
commit | 093902319ccc3d6bbb954fc40944a9e23aa68344 (patch) | |
tree | de5f95db360b1ef2eca1875a25edc0304cb1e0d2 /xlators/nfs/server/src/nfs3.h | |
parent | eb1744582d57d0f9fe08275781800c0c3459697f (diff) |
nfs : store sattr properly in nfs3_setattr() call
nfs3_setattr stores the input arguments in cs->stbuf.
However, inode/entry resolution code overwrites cs->stbuf
after a successful resolution, thereby overwriting the
input arguments with iatt values stored on backend.
Hence operations like chmod/chown turns out to be a NOP.
Specifically following are the functions that overwrite
cs->stbuf:
nfs3_fh_resolve_inode_lookup_cbk
nfs3_fh_resolve_entry_lookup_cbk
Since we resort to inode resolution only when inode is not
found in inode table and lru limit guards the number of
inodes in itable, we run into this issue only when the data
set is bigger than lru limit of itable.
Fix is to store input arguments in a member other than
cs->stbuf.
Thanks Du for suggesting the fix
Change-Id: I7caef48839d4f177c3557d7823fc1d35c8294939
BUG: 1318204
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14657
Smoke: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Atin Mukherjee <amukherj@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'xlators/nfs/server/src/nfs3.h')
-rw-r--r-- | xlators/nfs/server/src/nfs3.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs3.h b/xlators/nfs/server/src/nfs3.h index b55cb848638..4cb3e67528d 100644 --- a/xlators/nfs/server/src/nfs3.h +++ b/xlators/nfs/server/src/nfs3.h @@ -225,6 +225,7 @@ struct nfs3_local { cookie3 cookie; struct iovec datavec; mode_t mode; + struct iatt attr_in; /* NFSv3 FH resolver state */ int hardresolved; |