[systemd-devel] [correct PATCH v2] dev-root.device is not active, results in an umount spree

Martin Pitt martin.pitt at ubuntu.com
Mon May 18 07:08:51 PDT 2015


Martin Pitt [2015-05-17 15:54 +0200]:
> This fixes the original "systemd immediately unmounts my mounts" bug,
> but not for very long: If you remount or unmount just one mount on a
> tentative device, mountinfo changes, and device_found_node() now calls
> device_update_found_one() with "add == 0". Then
> 
>         n = add ? (d->found | found) : (d->found & ~found);
> 
> would unset the previous DEVICE_FOUND_MOUNT flag, leaving 0 (i. e.
> DEVICE_NOT_FOUND). Thus the previously "tentative" device would once
> again be set to "dead", and systemd would unmount all other mounts
> from it. This must never happen, we simply can't declare tentative
> devices as dead and clean up their unmounts, this only works for
> "plugged" ones that we know via udev.

Eek, I attached the wrong 0002- patch, sorry about that. The above is
fixed by the attached patch, please ignore 0002- from the previous
mail. For completeness I also re-attach 0001- again (unchanged).

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-device-create-units-with-intended-found-value.patch
Type: text/x-diff
Size: 4968 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150518/09d36e6f/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-device-never-transition-from-tentative-to-dead.patch
Type: text/x-diff
Size: 1945 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150518/09d36e6f/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150518/09d36e6f/attachment.sig>


More information about the systemd-devel mailing list