[systemd-devel] tentative state and unmount on mapper

Martin Pitt martin.pitt at ubuntu.com
Mon May 18 07:11:40 PDT 2015


Hey Umut,

Umut Tezduyar Lindskog [2015-05-18 15:59 +0200]:
> I have 2 mounts (one is bind mount) on mapper device.
> 
> /proc/self/mountinfo:
> 47 37 254:0 / /var/spool/storage/SD_DISK
> rw,nosuid,nodev,noexec,noatime,nodiratime shared:18 - ext4
> /dev/mapper/mmcblk0p1 rw,journal_checksum,commit=1,data=ordered
> 49 37 254:0 / /var/spool/storage/areas/SD_DISK/root
> rw,nosuid,nodev,noexec,noatime,nodiratime shared:18 - ext4
> /dev/mapper/mmcblk0p1 rw,journal_checksum,commit=1,data=ordered
> 
> systemctl -t device --all | grep map:
> dev-mapper-mmcblk0p1.device   loaded activating tentative /dev/mapper/mmcblk0p1
> 
> As soon as I unmount the bind mount, systemd picks up the change in
> /proc/self/mountinfo and changes the "tentative" device to "dead" and
> due to that all file systems BindsTo to the device are being
> unmounted. Application which mounted the partitions is not getting a
> chance to unmount the fs.

I stumbled over this as well. This is fixed in the 0002-* patch in

  http://lists.freedesktop.org/archives/systemd-devel/2015-May/031953.html

Direct link:
  http://lists.freedesktop.org/archives/systemd-devel/attachments/20150518/09d36e6f/attachment-0001.patch

This is caused by the device_update_found_one() state transition from
"tentative" to "dead" which we must never do as there is no way to
know when a tentative device is actually dead. We must only transition
to "dead" from "plugged".

Testing/feedback appreciated!

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: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150518/b070d96d/attachment.sig>


More information about the systemd-devel mailing list