Re: [PATCH] virtio_blk: allow re-reading config space at runtime

From: Michael S. Tsirkin
Date: Tue Feb 01 2011 - 13:38:49 EST


On Tue, Feb 01, 2011 at 06:32:34PM +0100, Christoph Hellwig wrote:
> On Thu, Jan 27, 2011 at 05:29:26PM +0200, Michael S. Tsirkin wrote:
> > Yes but in that specific situation (double schedule before
> > it runs once) discarding one change notification
> > would not hurt at all.
>
> Except that you can't easily do it. We can't simply reuse a work
> structure embedded in say struct virtio_blk without first doing a
> flush_work_sync/cancel_work_sync to remove it from the internal
> workqueue.c queues.
> And those calls can sleep and thus can't be called
> from interrupt context either.

Should not be hard to solve.
If it's running, it is ok to requeue. I don't remember offhand if it's
ok to requeue if it's queued but not running, if not we could have a
flag that signals that's the case.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/