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

Ming Lei
2013-12-16T12:12:09Z

On Sat, Dec 14, 2013 at 7:07 AM, Tejun Heo <tj@kernel.org> wrote:
>
>> All pending I/O should have been flushed when suspend/hibernate
>> started, and there's no point in trying to update metadata on a
>
> Frozen or not, it isn't guaranteed that bdi wb queue is empty when the
> system went to suspend. They're likely to be empty but there's no
> guarantee. Conversion to workqueue only makes the behavior more
> deterministic.

Looks we should guarantee that I/O queue is emptied before system sleep,
otherwise it may be a bug, since battery may be drained up to cause
data loss or block devices may be disconnected during sleep.

Thanks,
--
Ming Lei