currently the new interval (updated with lctl) will be used
only when the next shrink happens. with default interval it
will take at least 20 minutes. instead we should refresh it
immediately.
Change-Id: Id22824e48fbc50c1f464316ab5b574d1189bb0c5
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33204
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
return -ERANGE;
obd->u.cli.cl_grant_shrink_interval = val;
+ osc_update_next_shrink(&obd->u.cli);
+ osc_schedule_grant_work();
return count;
}
void osc_wake_cache_waiters(struct client_obd *cli);
int osc_shrink_grant_to_target(struct client_obd *cli, __u64 target_bytes);
+void osc_schedule_grant_work(void);
void osc_update_next_shrink(struct client_obd *cli);
int lru_queue_work(const struct lu_env *env, void *data);
int osc_extent_finish(const struct lu_env *env, struct osc_extent *ext,
schedule_work(&work.work);
}
+void osc_schedule_grant_work(void)
+{
+ cancel_delayed_work_sync(&work);
+ schedule_work(&work.work);
+}
+
/**
* Start grant thread for returing grant to server for idle clients.
*/