glusterfs
glusterfs copied to clipboard
mgmt: Remove old code related to version 3.x
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]
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;
}
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;
}
/run regression
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/
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;
}
/recheck smoke
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;
}
/run regression
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/
/run regression
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;
}
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;
}
/run regression
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...
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;
}
/recheck smoke
/run regression
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;
}
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/
/recheck smoke
/run regression
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;
}
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/
/run regression