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

From: Ming Lei
Date: Mon Dec 16 2013 - 07:12:20 EST


On Sat, Dec 14, 2013 at 7:07 AM, Tejun Heo <tj@xxxxxxxxxx> 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
--
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/