@@ -349,6 +349,8 @@ static ssize_t grant_shrink_interval_store(struct kobject *kobj,
return -ERANGE;
obd->u.cli.cl_grant_shrink_interval = val;
+ osc_update_next_shrink(&obd->u.cli);
+ osc_schedule_grant_work();
return count;
}
@@ -43,6 +43,7 @@
extern struct ptlrpc_request_pool *osc_rq_pool;
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,
@@ -905,6 +905,12 @@ static void osc_grant_work_handler(struct work_struct *data)
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.
*/