Whamcloud - gitweb
EX-4140 lamigo: ignore preallocate status
authorAlex Zhuravlev <bzzz@whamcloud.com>
Mon, 8 Nov 2021 08:37:00 +0000 (11:37 +0300)
committerJohn L. Hammond <jhammond@whamcloud.com>
Fri, 25 Mar 2022 19:57:33 +0000 (19:57 +0000)
preallocate status shouldn't be taken into account when space
usage is calculated, otherwise transient errors may cause
incorrect space utilization and unexpected mirrors to that
pool.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I7cefd3bc7366bd5b08e1e08cec2eaa4d91e16a90
Reviewed-on: https://review.whamcloud.com/46901
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
lipe/src/lamigo.c

index 2942283..6258766 100644 (file)
@@ -3515,12 +3515,11 @@ static void lamigo_refresh_pool_statfs(struct pool_list *pl, int max_used)
 
        pthread_rwlock_rdlock(&pl->pl_lock);
        for (i = 0; i < pl->pl_ostnr; i++) {
-               __u64 ost_used_kb, ost_total_kb, active, status;
+               __u64 ost_used_kb, ost_total_kb, active;
                int ostidx = pl->pl_osts[i];
 
                active = lamigo_read_osp_param(ostidx, "active");
-               status = lamigo_read_osp_param(ostidx, "prealloc_status");
-               if (!active || status)
+               if (!active)
                        continue;
 
                ost_total_kb = lamigo_read_osp_param(ostidx, "kbytestotal");