From a75f269cbdaed52985893cfbdebb35e9a2b484dd Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Tue, 12 Oct 2021 08:26:21 +0300 Subject: [PATCH] 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 --- lustre/osp/osp_precreate.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 1.8.3.1