From: Alex Zhuravlev Date: Tue, 12 Oct 2021 05:26:21 +0000 (+0300) Subject: LU-15082 osp: invalidate statfs data from the timer callback X-Git-Tag: 2.15.51~190 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F99%2F45199%2F11;p=fs%2Flustre-release.git LU-15082 osp: invalidate statfs data from the timer callback osp_statfs_timer_cb() can be called just before statfs data gets stale. this in turn may cause early wakeup to the precreate thread which would find statfs data still up-to-data and go back to slepp. if no precreate happens to this OSP (e.g. due to current space usage), then the precreate thread will stay asleep for a long time, statfs data won't get refreshed and this may block new objects on the corresponding OST. Signed-off-by: Alex Zhuravlev Change-Id: I86e16eed6f1068702db696a9ddec7a22994180b7 Reviewed-on: https://review.whamcloud.com/45199 Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index 5585ce1..6fd6f7f 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -81,6 +81,8 @@ static void osp_statfs_timer_cb(cfs_timer_cb_arg_t data) struct osp_device *d = cfs_from_timer(d, data, opd_statfs_timer); LASSERT(d); + /* invalidate statfs data so osp_precreate_thread() can refresh */ + d->opd_statfs_fresh_till = ktime_sub_ns(ktime_get(), NSEC_PER_SEC); if (d->opd_pre_task) wake_up(&d->opd_pre_waitq); }