lkml.org 
[lkml]   [2013]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] libata, freezer: avoid block device removal while system is frozen
Date
On Saturday, December 14, 2013 03:31:21 PM Tejun Heo wrote:
> Hello, Nigel.
>
> On Sat, Dec 14, 2013 at 10:15:21AM +1100, Nigel Cunningham wrote:
> > My understanding is that the point is ensuring that - particularly
> > in the case of hibernation - we don't cause filesystem corruption by
> > writing one thing while writing the image and then doing something
> > else (without knowledge of what happened while the image was being
> > written) while reading the image or after restoring it.
>
> So, all this is about hibernation?

No, it isn't. [I guess it was originally, but it has not been the case
for a very long time.] It is about getting user space interactions (all of
the sysfs/ioctl/mmap/read/write/you-name-it thingies user space can do to
devices) when we're calling device suspend/resume routines. The reason is
that otherwise all of them would have had to do a "oh, are we suspending by
the way?" check pretty much on every code path that can be triggered by
user space.

And I'd appreciate it if people didn't repeat the nonsense about possible
filesystem corruption. The freezing of tasks doesn't prevent that from
happening (which is easy to demonstrate by artificially fail restore from
hibernation multiple times in a row).

> Does that mean that it's safe to
> unfreeze before invoking resume?

No, it isn't.

Thanks,
Rafael



\
 
 \ /
  Last update: 2013-12-17 03:41    [W:0.081 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site