From 098a19e8b3ce7595e3c5a9d671a8bf6928b12393 Mon Sep 17 00:00:00 2001 From: Alexander Boyko Date: Thu, 30 Jun 2016 17:52:46 +0300 Subject: [PATCH 1/1] LU-8356 osp: wakeup osp_precreate_reserve on umount No reasons to wait reservation in osp_precreate_reserve when import is invalid. This may cause additional delays during umount. Signed-off-by: Sergey Cheremencev Signed-off-by: Alexander Boyko Seagate-bug-id: MRP-3603 Change-Id: If2c3449753633fb4cb81e0d0b22f6ecf0882be16 Reviewed-on: http://review.whamcloud.com/21103 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andriy Skulsyh Reviewed-by: Yang Sheng Reviewed-by: Oleg Drokin --- lustre/osp/osp_dev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); } -- 1.8.3.1