glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

mgmt: Remove old code related to version 3.x

Open mykaul opened this issue 2 years ago • 13 comments

There are many places that either bail out if it's an old version (very old version) or check first if it's newer than it (and it always is, these days). Removed all that code.

Updates: #3543 Signed-off-by: Yaniv Kaul [email protected]

mykaul avatar May 20 '22 20:05 mykaul

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

index ea1efe2e4..a3fff8ae1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2429,10 +2429,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar May 20 '22 21:05 gluster-ant

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

index ea1efe2e4..a3fff8ae1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2429,10 +2429,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar May 20 '22 21:05 gluster-ant

/run regression

mykaul avatar May 20 '22 21:05 mykaul

1 test(s) failed ./tests/basic/inode-quota-enforcing.t

0 test(s) generated core

6 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/basic/afr/ta-shd.t ./tests/basic/ctime/ctime-heal-symlinks.t ./tests/basic/inode-quota-enforcing.t

2 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t https://build.gluster.org/job/gh_centos7-regression/2511/

gluster-ant avatar May 20 '22 23:05 gluster-ant

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

index bfb01fb7e..87c37f9c5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2429,10 +2429,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar May 31 '22 14:05 gluster-ant

/recheck smoke

mykaul avatar May 31 '22 16:05 mykaul

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

index bfb01fb7e..87c37f9c5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2429,10 +2429,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar May 31 '22 17:05 gluster-ant

/run regression

mykaul avatar Jun 01 '22 05:06 mykaul

1 test(s) failed ./tests/basic/inode-quota-enforcing.t

0 test(s) generated core

6 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/basic/ctime/ctime-heal-symlinks.t ./tests/basic/glusterd/heald.t ./tests/basic/inode-quota-enforcing.t

2 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t https://build.gluster.org/job/gh_centos7-regression/2543/

gluster-ant avatar Jun 01 '22 06:06 gluster-ant

/run regression

mykaul avatar Jun 01 '22 15:06 mykaul

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

index bfb01fb7e..87c37f9c5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2429,10 +2429,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar Jun 01 '22 15:06 gluster-ant

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

index f95af9c4a..acaaa882f 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -312,10 +312,7 @@ __get_posixlk_count(pl_inode_t *pl_inode)
     posix_lock_t *lock = NULL;
     int32_t count = 0;
 
-    list_for_each_entry(lock, &pl_inode->ext_list, list)
-    {
-        count++;
-    }
+    list_for_each_entry(lock, &pl_inode->ext_list, list) { count++; }
 
     return count;
 }
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 60b0c1db2..47e1d86c6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2417,10 +2417,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar Jul 21 '22 09:07 gluster-ant

/run regression

mykaul avatar Jul 21 '22 09:07 mykaul

I think we should remove a lot more outdated code, then we can decide what's the oldest we might want to check for some compatibility...

mykaul avatar Sep 24 '22 19:09 mykaul

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

index 60b0c1db2..47e1d86c6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2417,10 +2417,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar Sep 24 '22 20:09 gluster-ant

/recheck smoke

mykaul avatar Sep 25 '22 12:09 mykaul

/run regression

mykaul avatar Sep 25 '22 12:09 mykaul

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

index 60b0c1db2..47e1d86c6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2417,10 +2417,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar Sep 25 '22 12:09 gluster-ant

1 test(s) failed ./tests/bugs/distribute/bug-882278.t

0 test(s) generated core

2 test(s) needed retry ./tests/bugs/bitrot/bug-1227996.t ./tests/bugs/distribute/bug-882278.t https://build.gluster.org/job/gh_centos7-regression/2907/

gluster-ant avatar Sep 25 '22 14:09 gluster-ant

/recheck smoke

xhernandez avatar Sep 29 '22 09:09 xhernandez

/run regression

xhernandez avatar Sep 29 '22 09:09 xhernandez

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

index 60b0c1db2..47e1d86c6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -2417,10 +2417,7 @@ gd_get_brick_count(struct cds_list_head *bricks)
 {
     glusterd_pending_node_t *pending_node = NULL;
     int npeers = 0;
-    cds_list_for_each_entry(pending_node, bricks, list)
-    {
-        npeers++;
-    }
+    cds_list_for_each_entry(pending_node, bricks, list) { npeers++; }
     return npeers;
 }
 

gluster-ant avatar Sep 29 '22 10:09 gluster-ant

1 test(s) failed ./tests/00-geo-rep/georep-basic-dr-tarssh.t

0 test(s) generated core

5 test(s) needed retry ./tests/000-flaky/basic_distribute_rebal-all-nodes-migrate.t ./tests/000-flaky/bugs_distribute_bug-1117851.t ./tests/000-flaky/bugs_glusterd_bug-857330/normal.t ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t ./tests/00-geo-rep/georep-basic-dr-tarssh.t

3 flaky test(s) marked as success even though they failed ./tests/000-flaky/bugs_distribute_bug-1117851.t ./tests/000-flaky/bugs_glusterd_bug-857330/normal.t ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t https://build.gluster.org/job/gh_centos7-regression/2932/

gluster-ant avatar Sep 29 '22 18:09 gluster-ant

/run regression

xhernandez avatar Sep 30 '22 10:09 xhernandez