Re: [PATCH] libata, freezer: avoid block device removal while systemis frozen

From: Tejun Heo
Date: Wed Dec 18 2013 - 16:41:40 EST


On Wed, Dec 18, 2013 at 04:39:36PM -0500, Tejun Heo wrote:
> Yeah, we can just rip out the whole freezer support and let the
> caller's pm notification hooks implement it by doing
>
> workqueue_set_max_active(wq, 0);
> flush_workqueue(wq);

Oops, the above doesn't work but I can trivially add a new interface
for this. Something which waits for the max_active to drop below the
newly set level before returning.

workqueue_set_max_active_and_wait(wq, 0);

Thanks.

--
tejun
--
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/