glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

libglusterfs, afr: add and use volume option with no effect

Open dmantipov opened this issue 3 years ago • 5 comments

Introduce OPT_FLAG_NOEFFECT option flag to denote an option which has no effect but have to be retained for some reason (mostly to implement some kind of backward compatibility), and mark cluster.locking-scheme as an example of such option. Drop related AFR internals and adjust related code as well.

Signed-off-by: Dmitry Antipov [email protected] Updates: #1000

dmantipov avatar Jan 21 '22 08:01 dmantipov

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index 5b994644e..3fd233438 100644
--- a/libglusterfs/src/options.c
+++ b/libglusterfs/src/options.c
@@ -1170,7 +1170,8 @@ xlator_option_info_list(volume_opt_list_t *list, char *key, char **def_val,
         if (opt->flags & OPT_FLAG_NOEFFECT)
             gf_asprintf(descr,
                         "%s This option has no effect but retained for the "
-                        "backward compatibility.", opt->description);
+                        "backward compatibility.",
+                        opt->description);
         else if (opt->flags & OPT_FLAG_RANGE)
             gf_asprintf(descr,
                         "%s Minimum value is %.0lf, maximum value "

gluster-ant avatar Jan 21 '22 08:01 gluster-ant

/run regression

dmantipov avatar Jan 21 '22 12:01 dmantipov

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index f0d650827..2c1f10471 100644
--- a/libglusterfs/src/options.c
+++ b/libglusterfs/src/options.c
@@ -1170,7 +1170,8 @@ xlator_option_info_list(volume_opt_list_t *list, char *key, char **def_val,
         if (opt->flags & OPT_FLAG_NOEFFECT)
             gf_asprintf(descr,
                         "%s This option has no effect but retained for "
-                        "backward compatibility.", opt->description);
+                        "backward compatibility.",
+                        opt->description);
         else if (opt->flags & OPT_FLAG_RANGE)
             gf_asprintf(descr,
                         "%s Minimum value is %.0lf, maximum value "

gluster-ant avatar Jan 24 '22 09:01 gluster-ant

/run regression

dmantipov avatar Jan 24 '22 10:01 dmantipov

Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.

stale[bot] avatar Sep 20 '22 19:09 stale[bot]

Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.

stale[bot] avatar Oct 16 '22 03:10 stale[bot]