summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.h
diff options
context:
space:
mode:
authorShyamsundarR <srangana@redhat.com>2018-03-10 23:08:04 -0500
committerRaghavendra G <rgowdapp@redhat.com>2018-03-11 15:52:22 +0530
commit03b31d91bad7a694cff863a20843fcf3b1df82f7 (patch)
tree62da23b8230028b1c0ec4c9dd8d13d4d7d68245e /libglusterfs/src/common-utils.h
parent95ae89504e302426e96b044c57ec07e81095c4dc (diff)
protocol: Fix 4.0 client, parsing older iatt in dict
In a mixed mode cluster involving 4.0 and older 3.x bricks, if clients are newer, then the iatt encoded in the dictionary can be of the older iatt format, which a newer client will map incorrectly to the newer structure. This causes failures in FOPs that depend on this iatt for some functionality (seen in mkdir operations failing as EIO, when DHT hits its internal setxattr call). The fix provided is to convert the iatt in the dict, based on which RPC version is used to communicate with the server. IOW, this is the reverse of change in commit "b966c7790e" Tested using a mixed mode cluster (i.e bricks in 3.12 and 4.0 versions) and a mixed set of clients, 3.12 and 4.0 clients. There is no regression test provided, as this needs a mixed mode cluster to test and validate. >Change-Id: I454e54651ca836b9f7c28f45f51d5956106aefa9 >BUG: 1554053 >Signed-off-by: ShyamsundarR <srangana@redhat.com> Change-Id: I454e54651ca836b9f7c28f45f51d5956106aefa9 BUG: 1554077 Signed-off-by: ShyamsundarR <srangana@redhat.com> Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'libglusterfs/src/common-utils.h')
-rw-r--r--libglusterfs/src/common-utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index c7f9fd58cc8..c6c82e2696a 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -954,4 +954,10 @@ gf_strncpy (char *dest, const char *src, const size_t dest_size);
void
gf_strTrim (char **s);
+int
+gf_replace_old_iatt_in_dict (struct _dict *);
+
+int
+gf_replace_new_iatt_in_dict (struct _dict *);
+
#endif /* _COMMON_UTILS_H */