Whamcloud - gitweb
Branch: HEAD
authorwangdi <wangdi>
Wed, 17 Aug 2005 13:00:24 +0000 (13:00 +0000)
committerwangdi <wangdi>
Wed, 17 Aug 2005 13:00:24 +0000 (13:00 +0000)
for inactive tgts, we should clear l_ast_data too, thanks bzzz remind

lustre/lov/lov_internal.h
lustre/lov/lov_obd.c

index 75258d7..723ce86 100644 (file)
@@ -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;
index 31c1be1..00a2a96 100644 (file)
@@ -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;