From cebb8fd03635f2f4e8f17c3a902eeba8008b07c4 Mon Sep 17 00:00:00 2001 From: Aurelien Degremont Date: Wed, 12 Nov 2014 14:00:59 +0100 Subject: [PATCH] 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. Patch backported from master: Lustre-change: http://review.whamcloud.com/12617 Lustre-commit: b50a6ccf9fe32c2fae1e6225f8e1a5b420b45d56 Signed-off-by: Aurelien Degremont Change-Id: I26ea91e54275f9e1accf51b779edf1b6e6a796a0 Reviewed-on: http://review.whamcloud.com/12685 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/lod/lod_qos.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/lod/lod_qos.c b/lustre/lod/lod_qos.c index e7b1de0..a90f70c 100644 --- a/lustre/lod/lod_qos.c +++ b/lustre/lod/lod_qos.c @@ -150,6 +150,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); @@ -198,7 +199,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); - int i, idx, rc = 0; + int i, idx; __u64 max_age, avail; ENTRY; @@ -210,15 +211,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; -- 1.8.3.1