X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flfsck%2Flfsck_lib.c;h=c509cbd2df37c3fea6fa7e7993084d1b13fe8046;hb=4c4f74b0a581e139f3bf3db1a41d2b11594c039f;hp=f6f1cce9006521388e3f0bee617845982f962303;hpb=7ad24ad7978051c942381f66e04fd52bb9967dea;p=fs%2Flustre-release.git diff --git a/lustre/lfsck/lfsck_lib.c b/lustre/lfsck/lfsck_lib.c index f6f1cce..c509cbd 100644 --- a/lustre/lfsck/lfsck_lib.c +++ b/lustre/lfsck/lfsck_lib.c @@ -2248,9 +2248,10 @@ int lfsck_stop(const struct lu_env *env, struct dt_device *key, mutex_lock(&lfsck->li_mutex); spin_lock(&lfsck->li_lock); + /* no error if LFSCK is already stopped, or was never started */ if (thread_is_init(thread) || thread_is_stopped(thread)) { spin_unlock(&lfsck->li_lock); - GOTO(out, rc = -EALREADY); + GOTO(out, rc = 0); } if (stop != NULL) { @@ -2635,7 +2636,7 @@ unlock: spin_lock(<ds->ltd_lock); ltd->ltd_dead = 1; spin_unlock(<ds->ltd_lock); - lfsck_stop_notify(env, lfsck, ltds, ltd, LT_LAYOUT); + lfsck_stop_notify(env, lfsck, ltds, ltd, LFSCK_TYPE_LAYOUT); lfsck_tgt_put(ltd); }