X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fosp%2Fosp_dev.c;h=2a8362a4a49deb2c7aa214f2793ccb83c7f26f7a;hp=087d1c997ad8a3152ada59a223959a26981ada76;hb=098a19e8b3ce7595e3c5a9d671a8bf6928b12393;hpb=52a465cf16b438b6777675c35ed653063d936ad2 diff --git a/lustre/osp/osp_dev.c b/lustre/osp/osp_dev.c index 087d1c9..2a8362a 100644 --- a/lustre/osp/osp_dev.c +++ b/lustre/osp/osp_dev.c @@ -1578,6 +1578,7 @@ static int osp_import_event(struct obd_device *obd, struct obd_import *imp, enum obd_import_event event) { struct osp_device *d = lu2osp_dev(obd->obd_lu_dev); + int rc; switch (event) { case IMP_EVENT_DISCON: @@ -1599,9 +1600,11 @@ static int osp_import_event(struct obd_device *obd, struct obd_import *imp, d->opd_obd->obd_inactive = 1; if (d->opd_connect_mdt) break; - if (d->opd_pre != NULL) { - osp_pre_update_status(d, -ENODEV); + /* Import is invalid, we can`t get stripes so + * wakeup waiters */ + rc = imp->imp_deactive ? -ESHUTDOWN : -ENODEV; + osp_pre_update_status(d, rc); wake_up(&d->opd_pre_waitq); }