From: wangdi Date: Wed, 17 Aug 2005 13:00:24 +0000 (+0000) Subject: Branch: HEAD X-Git-Tag: 1.4.10~712 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=9a6a09449579ff04bc20f925778123e3d56d3448;p=fs%2Flustre-release.git Branch: HEAD for inactive tgts, we should clear l_ast_data too, thanks bzzz remind --- diff --git a/lustre/lov/lov_internal.h b/lustre/lov/lov_internal.h index 75258d7..723ce86 100644 --- a/lustre/lov/lov_internal.h +++ b/lustre/lov/lov_internal.h @@ -142,6 +142,14 @@ lov_tgt_decref(struct lov_obd *lov, struct lov_tgt_desc *tgt) wake_up(&lov->lov_tgt_waitq); } +static inline void +lov_tgt_incref(struct lov_obd *lov, struct lov_tgt_desc *tgt) +{ + lov_tgts_lock(lov); + ++tgt->ltd_refcount; + lov_tgts_unlock(lov); +} + struct lov_async_page { int lap_magic; int lap_stripe; diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 31c1be1..00a2a96 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -1766,11 +1766,7 @@ static int lov_change_cbdata(struct obd_export *exp, struct lov_tgt_desc *tgt = lov->tgts + loi->loi_ost_idx; struct lov_stripe_md submd; - if (!lov_tgt_active(lov, tgt, loi->loi_ost_gen)) { - CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx); - continue; - } - + lov_tgt_incref(lov, tgt); submd.lsm_object_id = loi->loi_id; submd.lsm_object_gr = lsm->lsm_object_gr; submd.lsm_stripe_count = 0;