From: Aurelien Degremont Date: Fri, 7 Nov 2014 13:10:03 +0000 (+0100) Subject: LU-5778 lod: Fix lod_qos_statfs_update() X-Git-Tag: 2.6.91~75 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b50a6ccf9fe32c2fae1e6225f8e1a5b420b45d56;hp=eb8452240bce761062d49ff7cbd6398a239d431c LU-5778 lod: Fix lod_qos_statfs_update() When an OST is sick, or unactivate, lod cannot fetch its statfs information. In lod_qos_statfs_update() this was preventing lod to get information for other OST because refresh was stopped at first error. This patch fixes this behaviour. Signed-off-by: Aurelien Degremont Change-Id: Id0217f228381ef7a41fdbfd99f5499dcc97ace0e Reviewed-on: http://review.whamcloud.com/12617 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Niu Yawei Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- diff --git a/lustre/lod/lod_qos.c b/lustre/lod/lod_qos.c index 6abaa1a..6be2281 100644 --- a/lustre/lod/lod_qos.c +++ b/lustre/lod/lod_qos.c @@ -190,6 +190,7 @@ static int lod_statfs_and_check(const struct lu_env *env, struct lod_device *d, { struct lod_tgt_desc *ost; int rc; + ENTRY; LASSERT(d); ost = OST_TGT(d,index); @@ -253,7 +254,7 @@ static void lod_qos_statfs_update(const struct lu_env *env, struct obd_device *obd = lod2obd(lod); struct ost_pool *osts = &(lod->lod_pool_info); unsigned int i; - int idx, rc = 0; + int idx; __u64 max_age, avail; ENTRY; @@ -265,15 +266,14 @@ static void lod_qos_statfs_update(const struct lu_env *env, down_write(&lod->lod_qos.lq_rw_sem); if (cfs_time_beforeq_64(max_age, obd->obd_osfs_age)) - GOTO(out, rc = 0); + goto out; for (i = 0; i < osts->op_count; i++) { idx = osts->op_array[i]; avail = OST_TGT(lod,idx)->ltd_statfs.os_bavail; - rc = lod_statfs_and_check(env, lod, idx, - &OST_TGT(lod,idx)->ltd_statfs); - if (rc) - break; + if (lod_statfs_and_check(env, lod, idx, + &OST_TGT(lod, idx)->ltd_statfs)) + continue; if (OST_TGT(lod,idx)->ltd_statfs.os_bavail != avail) /* recalculate weigths */ lod->lod_qos.lq_dirty = 1;