[PATCH] let dmeventd unmount invalid snapshots (BZ 189462)

Alasdair G Kergon <[email protected]>
Newsgroups dev.linux.lists.lvm-devel
Message-ID <[email protected]>
On Thu, Oct 07, 2010 at 03:10:43PM +0200, Peter Rockai wrote:
> There are some trade-offs involved. I have opted for using an umount
> syscall directly since it's simpler and more robust. The downside is
> that /etc/mtab will go out of sync and people may actually think that

I'm not keen on leaving /etc/mtab out-of-date, or missing out anything
else that /bin/umount might actually do (with an errored-out device).
Would this patch need an update to the selinux context to allow umount?

> the snapshot is still mounted (mount(8) just prints mtab without
> thinking twice about it). We could just fork off umount(8) instead, but
> that can fail in new and interesting ways.

Yes, even if moved outside the locking.  But even umount2() within
the lock might have deadlock possibilities, as might syslog() as
you point out.

The options/problems here need a bit more investigation.
 
> The other possible issue with the patch is that I am not sure whether
> it's actually safe to read /proc/mounts incrementally, with possibly
 
kabi found problems like that with another /proc file.

Alasdair
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.