From 34e3281f63528630116c8164eb4cd2b5af92317d Mon Sep 17 00:00:00 2001 From: Sergey Cheremencev Date: Tue, 6 Dec 2016 12:16:05 +0300 Subject: [PATCH] LU-8910 osp: Add correct handling of errors to osp_statfs_interpret MDT's statfs info could be disagreed with OST's info for a very long time. If osp_statfs_update() is called and extends the timeout 1000*obd_timeout into the future but then osp_statfs_interpret() hits an error it will never reset the timeout. Now when osp_update_statfs request fails osp_statfs_interpret causes osp_precreate_cleanup_orphans to send new one after 10 seconds. Change-Id: Ib282d806ba4932db5c72df34905988f96de99297 Cray-bug-id: MRP-3892 Signed-off-by: Sergey Cheremencev Reviewed-on: https://review.whamcloud.com/24167 Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: Alexandr Boyko Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/osp/osp_precreate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index 97ed157..8fbdcb4 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -150,7 +150,9 @@ static int osp_statfs_interpret(const struct lu_env *env, RETURN(0); out: - /* couldn't update statfs, try again as soon as possible */ + /* couldn't update statfs, try again with a small delay */ + d->opd_statfs_fresh_till = ktime_add_ns(ktime_get(), 10 * NSEC_PER_SEC); + d->opd_statfs_update_in_progress = 0; if (d->opd_pre != NULL && osp_precreate_running(d)) wake_up(&d->opd_pre_waitq); -- 1.8.3.1