li_drop_dryrun:1, /* Ever dryrun, not now. */
li_master:1, /* Master instance or not. */
li_current_oit_processed:1,
- li_start_unplug:1;
+ li_start_unplug:1,
+ li_stopping:1;
struct lfsck_rec_lmv_save li_rec_lmv_save[LFSCK_REC_LMV_MAX_DEPTH];
};
if (unlikely(lfsck == NULL))
RETURN(-ENXIO);
+ if (unlikely(lfsck->li_stopping))
+ GOTO(put, rc = -ENXIO);
+
/* System is not ready, try again later. */
if (unlikely(lfsck->li_namespace == NULL ||
lfsck_dev_site(lfsck)->ss_server_fld == NULL))
}
spin_lock(&lfsck->li_lock);
+ /* The target is umounted */
+ if (stop && stop->ls_status == LS_PAUSED)
+ lfsck->li_stopping = 1;
+
if (thread_is_init(thread) || thread_is_stopped(thread))
/* no error if LFSCK stopped already, or not started */
GOTO(unlock, rc = 0);