summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2017-12-25 19:19:53 +0530
committerAmar Tumballi <amarts@redhat.com>2017-12-29 17:13:25 +0000
commit9fd17c1c3c44944ea280c4c15bad0d49b298b8a9 (patch)
tree26620d09b2e7fd55aff5a302d8bd15f547352e2b /xlators/cluster/afr
parentcc425b0de57d574f6e68b6ef5edfdf99cd8353af (diff)
posix: Introduce flags for validity of iatt members
v1 of the patch started off as adding new fields to iatt that can be filled up using statx but the discussions were more around introducing masks to check the validity of different fields from a RIO perspective. To that extent, I have dropped the statx call in this version and introduced a 64 bit mask for existing fields. The masks I have defined are similar with the statx() flags' masks. I have *not* changed iatt_to_stat() to use the macros IATT_TYPE_VALID, IATT_GFID_VALID etc before blindly copying from struct iatt to struct. Also fixed warnings in xlators because of atime/mtime/ctime seconds field change from uint32_t to int64_t. Change-Id: I4ac614f1e8d5c8246fc99d5bc2d2a23e7941512b Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index 7e020bb6bee..88a3d9618e3 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -1015,7 +1015,7 @@ afr_sh_fav_by_majority (xlator_t *this, struct afr_reply *replies,
for (i = 0; i < priv->child_count; i++) {
if (replies[i].valid == 1) {
gf_msg_debug (this->name, 0, "Child:%s "
- "mtime_sec = %d, size = %lu for gfid %s",
+ "mtime_sec = %ld, size = %lu for gfid %s",
priv->children[i]->name,
replies[i].poststat.ia_mtime,
replies[i].poststat.ia_size,
@@ -1056,7 +1056,7 @@ afr_sh_fav_by_mtime (xlator_t *this, struct afr_reply *replies, inode_t *inode)
for (i = 0; i < priv->child_count; i++) {
if (replies[i].valid == 1) {
gf_msg_debug (this->name, 0, "Child:%s "
- "mtime = %d, mtime_nsec = %d for gfid %s",
+ "mtime = %ld, mtime_nsec = %d for gfid %s",
priv->children[i]->name,
replies[i].poststat.ia_mtime,
replies[i].poststat.ia_mtime_nsec,
@@ -1096,7 +1096,7 @@ afr_sh_fav_by_ctime (xlator_t *this, struct afr_reply *replies, inode_t *inode)
for (i = 0; i < priv->child_count; i++) {
if (replies[i].valid == 1) {
gf_msg_debug (this->name, 0, "Child:%s "
- "ctime = %d, ctime_nsec = %d for gfid %s",
+ "ctime = %ld, ctime_nsec = %d for gfid %s",
priv->children[i]->name,
replies[i].poststat.ia_ctime,
replies[i].poststat.ia_ctime_nsec,