Re: swsusp: move resume before mounting root [diff against vanilla 2.4.9]

Albert D. Cahalan
2001-09-29T07:55:10Z

Pavel Machek writes:
> [Albert Cahalan]
>> [Pavel Machek]

>>> I can't do that: open deleted files.
>>
>> Tough luck. Either use the same hack as NFS, or have such files
>> return -EIO for all operations and give SIGBUS for mappings.
>> Maybe just refuse to suspend when there are open deleted files.
>> Oh, just create a name in the filesystem root and use that.
>> Something like ".8fe4a979.swsusp" would be fine. Whatever!
>
> ...and break locking and similar stuff. NFS is not as good as local
> filesystem.

Oh well. Network connections die and real-time apps fail too.
It is important to have safe and useful behavior in the presence
of arbitrary filesystem modifications. It is very nice to be able
to use suspend/resume to alternate between two running kernels.

I wouldn't worry about locking. Write/discard all data on suspend,
then examine the inode on resume. As long as the inode doesn't
change by more than the atime, the lock can survive.