Messages in this thread | | | Date | Fri, 20 Sep 2013 18:02:56 -0500 | From | Tejun Heo <> | Subject | Re: [PATCH] writeback: fix delayed sync(2) |
| |
Hello,
On Fri, Sep 20, 2013 at 04:52:26PM +0400, Maxim Patlasov wrote: > @@ -294,7 +294,7 @@ void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi) > unsigned long timeout; > > timeout = msecs_to_jiffies(dirty_writeback_interval * 10); > - mod_delayed_work(bdi_wq, &bdi->wb.dwork, timeout); > + queue_delayed_work(bdi_wq, &bdi->wb.dwork, timeout);
Hmmm... this at least requires comment explaining why mod_delayed_work() doesn't work here. Also, I wonder whether what we need is a function which either queues if !pending and shortens timer if pending. This is a relatively common pattern and the suggested fix is subtle and fragile.
Thanks.
-- tejun
| |