On Saturday 23 August 2014 at 18:22:42, Andrei Borzenkov wrote: 
> В Sat, 23 Aug 2014 16:47:51 +0400
> Ivan Shapovalov <[email protected]> пишет:
> 
> > This patchset allows systemd to parse resume= kernel command line parameter
> > and initiate resume from the specified device.
> > 
> > It adds:
> > - a 'systemd-resume' tool which takes path to a device node and
> >   writes its major:minor to /sys/power/state;
> > - a corresponding '[email protected]' templated unit;
> > - a 'systemd-resume-generator' generator which parses the kernel command 
> > line
> >   and instantiates the unit as necessary.
> > 
> > This functionality already exists in-kernel, but only for "/dev/sdXY"-style
> > pathes. Implementing it in userspace allows to use arbitrary udev-created
> > symlinks, e. g. persistent block device pathes ("/dev/disk/by-foo/bar").
> > 
> > Userspace parsing of resume= kernel command line parameter has been
> > traditionally done in initramfs via shell scripts (for Arch Linux, this is
> > "resume" mkinitcpio hook), so I feel that this feature has its place within
> > systemd.
> > 
> > Due to the nature of hibernation, the resume unit must be activated before
> > any modifications to filesystems take place. This can happen
> > 1) in initramfs before mounting anything, and
> > 2) without initramfs before remounting rootfs read-write (provided that it 
> > is
> >    mounted RO initially).
> > 
> 
> Your patch has
> 
> +ConditionPathExists=|/etc/initrd-release
> 
> Which excludes non-initrd usage, right? Also some filesystems (reiserfs
> comes in mind) replayed journal even when mounted read-only. So may be
> it should explicitly state initrd-only support and name units
> accordingly.

It doesn't exclude non-initramfs image -- there is a second OR-ed conditional
allowing this unit to run on a ro-mounted real root.

I didn't know that reiserfs can write to a ro-mounted fs. If that's true,
non-initramfs usage must be prohibited. I'll send a v2.

Thanks for pointing that out!

-- 
Ivan Shapovalov / intelfx /

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to