All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Rockai <prockai@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] let dmeventd unmount invalid snapshots (BZ 189462)
Date: Thu, 07 Oct 2010 15:10:43 +0200	[thread overview]
Message-ID: <877hhujgh8.fsf_-_@twilight.int.mornfall.net.> (raw)
In-Reply-To: <87r5g4lejw.fsf@twilight.int.mornfall.net.> (Petr Rockai's message of "Tue, 05 Oct 2010 19:44:51 +0200")

Hi,

this is the second part of the snapshot monitoring stuff for
dmeventd. This one will remove mounts of a snapshot when it is
invalidated.

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
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.

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
intervening mount/umount calls. It *seems* to be, but a confirmation
would be nice.

The code comes (as usual) with an automated test:
test/t-snapshot-autoumount-dmeventd.sh

Yours,
   Petr.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmeventd-snapshot-umount.diff
Type: text/x-diff
Size: 4941 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20101007/2686b3ab/attachment.bin>

  reply	other threads:[~2010-10-07 13:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05 13:51 [PATCH] automatic snapshot extension with dmeventd (BZ 427298) Petr Rockai
2010-10-05 17:44 ` Petr Rockai
2010-10-07 13:10   ` Petr Rockai [this message]
2010-10-07 19:23     ` [PATCH] let dmeventd unmount invalid snapshots (BZ 189462) Alasdair G Kergon
2010-10-20 22:50       ` Petr Rockai
2010-10-29 11:49     ` Petr Rockai
2010-10-29 12:44       ` Petr Rockai
2010-10-29 13:34       ` Zdenek Kabelac
2010-10-14  9:51   ` [PATCH] automatic snapshot extension with dmeventd (BZ 427298) Zdenek Kabelac
2010-10-15 11:57     ` Petr Rockai
2010-10-15 12:55       ` Zdenek Kabelac
2010-10-15 14:15         ` Alasdair G Kergon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hhujgh8.fsf_-_@twilight.int.mornfall.net. \
    --to=prockai@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.