diff options
| -rw-r--r-- | libglusterfs/src/glusterfs/globals.h | 1 | ||||
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 14 | 
2 files changed, 13 insertions, 2 deletions
diff --git a/libglusterfs/src/glusterfs/globals.h b/libglusterfs/src/glusterfs/globals.h index f0c7395b4cb..6efd6d287f8 100644 --- a/libglusterfs/src/glusterfs/globals.h +++ b/libglusterfs/src/glusterfs/globals.h @@ -118,6 +118,7 @@  #define GD_OP_VERSION_7_0 70000 /* Op-version for GlusterFS 7.0 */  #define GD_OP_VERSION_7_1 70100 /* Op-version for GlusterFS 7.1 */  #define GD_OP_VERSION_7_2 70200 /* Op-version for GlusterFS 7.2 */ +#define GD_OP_VERSION_7_3 70300 /* Op-version for GlusterFS 7.3 */  #define GD_OP_VERSION_8_0 80000 /* Op-version for GlusterFS 8.0 */ diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 59287ee6ba7..a085a0ff8d6 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -3626,6 +3626,8 @@ set_afr_pending_xattrs_option(volgen_graph_t *graph,               * for client xlators in volfile.               * ta client xlator indexes are - 2, 5, 8 depending on the index of               * subvol. e.g- For first subvol ta client xlator id is volname-ta-2 +             * For pending-xattr, ta name would be +             * 'volname-ta-2.{{volume-uuid}}' from GD_OP_VERSION_7_3.               */              ta_brick_index = 0;              if (volinfo->thin_arbiter_count == 1) { @@ -3638,8 +3640,16 @@ set_afr_pending_xattrs_option(volgen_graph_t *graph,                      }                      ta_brick_index++;                  } - -                strncat(ptr, ta_brick->brick_id, strlen(ta_brick->brick_id)); +                if (conf->op_version < GD_OP_VERSION_7_3) { +                    strncat(ptr, ta_brick->brick_id, +                            strlen(ta_brick->brick_id)); +                } else { +                    char ta_volname[PATH_MAX] = ""; +                    int len = snprintf(ta_volname, PATH_MAX, "%s.%s", +                                       ta_brick->brick_id, +                                       uuid_utoa(volinfo->volume_id)); +                    strncat(ptr, ta_volname, len); +                }              }              ret = xlator_set_fixed_option(afr_xlators_list[index++],  | 
