[systemd-devel] [PATCH v3] device: Fix overzealous unmounting of tentative device mounts

Martin Pitt martin.pitt at ubuntu.com
Tue May 19 07:05:00 PDT 2015


Martin Pitt [2015-05-19 15:17 +0200]:
> My first hunch is that this is caused by calling
> mount_load_proc_self_mountinfo() in mount_dispatch_io()
> (src/core/mount.c:1682) *before* it goes through that new
> SET_FOREACH() loop. That call will already see the removed mount and
> call device_found_node() with the removal.

That was a red herring. Turns out that your patch only added devices
to "around" which had "mount->just_mounted || mount->just_changed",
which is obviously not the case for mounts which have been around for
a while (and these are the ones we need to keep!). This patch fixes
that; although I'm unsure yet whether we *also* need to record the ones
with "mount->just_mounted || mount->just_changed"; my gut feeling says
yes, and we need to restructure this a bit to run the set_put(around, ...)
for all mount->is_mounted Mount units. WDYT?

Anyway, with this it behaves as it should.

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-mount-Fix-mountinfo-check-for-devices-which-are-stil.patch
Type: text/x-diff
Size: 1737 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150519/ef865d53/attachment.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/20150519/ef865d53/attachment.sig>


More information about the systemd-devel mailing list