Whamcloud - gitweb
LU-7156 mdd: add changelog_size to procfs
[fs/lustre-release.git] / lustre / lfsck / lfsck_engine.c
index d1053c1..56052c2 100644 (file)
@@ -1152,9 +1152,10 @@ static int lfsck_assistant_query_others(const struct lu_env *env,
        memset(lr, 0, sizeof(*lr));
        lr->lr_event = LE_QUERY;
        lr->lr_active = com->lc_type;
+
+       memset(laia, 0, sizeof(*laia));
        laia->laia_com = com;
        laia->laia_lr = lr;
-       laia->laia_shared = 0;
 
        if (!list_empty(&lad->lad_mdt_phase1_list)) {
                ltds = &lfsck->li_mdt_descs;
@@ -1268,9 +1269,10 @@ static int lfsck_assistant_notify_others(const struct lu_env *env,
 
        lr->lr_index = lfsck_dev_idx(lfsck);
        lr->lr_active = com->lc_type;
+
+       memset(laia, 0, sizeof(*laia));
        laia->laia_com = com;
        laia->laia_lr = lr;
-       laia->laia_shared = 0;
 
        switch (lr->lr_event) {
        case LE_START:
@@ -1293,8 +1295,6 @@ static int lfsck_assistant_notify_others(const struct lu_env *env,
                        LASSERT(ltd != NULL);
 
                        laia->laia_ltd = ltd;
-                       ltd->ltd_layout_done = 0;
-                       ltd->ltd_synced_failures = 0;
                        rc = lfsck_async_request(env, ltd->ltd_exp, lr, set,
                                        lfsck_async_interpret_common,
                                        laia, LFSCK_NOTIFY);
@@ -1577,6 +1577,7 @@ int lfsck_assistant_engine(void *args)
        }
 
        spin_lock(&lad->lad_lock);
+       lad->lad_task = current;
        thread_set_flags(athread, SVC_RUNNING);
        spin_unlock(&lad->lad_lock);
        wake_up_all(&mthread->t_ctl_waitq);
@@ -1820,6 +1821,7 @@ fini:
        lad->lad_assistant_status = (rc1 != 0 ? rc1 : rc);
        thread_set_flags(athread, SVC_STOPPED);
        wake_up_all(&mthread->t_ctl_waitq);
+       lad->lad_task = NULL;
        spin_unlock(&lad->lad_lock);
 
        CDEBUG(D_LFSCK, "%s: %s LFSCK assistant thread exit: rc = %d\n",