All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Cleanup partial failure of activation
Date: Wed, 21 Nov 2007 21:16:44 -0500	[thread overview]
Message-ID: <4744E68C.3050601@ce.jp.nec.com> (raw)
In-Reply-To: <20071121224217.GQ22843@agk.fab.redhat.com>

Alasdair G Kergon wrote:
> On Wed, Nov 21, 2007 at 11:00:03AM -0500, Jun'ichi Nomura wrote:
>> If activate_lv() fails, callers won't call deactivate_lv().
>> However, activate_lv() may succeeded activation partially.
>  
>> Attached patch deactivates a partially activated LV so that
>> callers of activate_lv() don't need to care about partial failure.
> 
> But could the deactivation call deactivate something that was active *before*
> it was called?  Are you sure this will always accurately return things to the
> state they were in prior to the failed call, and not deactivate something that
> was previously active?

Currently, mirror, snapshot and pvmove are only stacking-type LVs.
They don't allow partial activation.
# Is this assumption correct?

If the above is correct, the tree is either activated or deactivated
as a whole. So, if activation failed, deactivating the LV would
return it to the state before activation is called.


And if, in future, partial activation is allowed, I think the
current activation implementation can't handle this case anyway:
  1. activate partial tree
  2. activate other tree on top of the partial tree
  ..
  3. deactivate the other tree
  <but don't want to deactivate the partial tree>

I'm not whether there actually is such a use case.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America



  reply	other threads:[~2007-11-22  2:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-21 16:00 [PATCH] Cleanup partial failure of activation Jun'ichi Nomura
2007-11-21 22:42 ` Alasdair G Kergon
2007-11-22  2:16   ` Jun'ichi Nomura [this message]
2007-11-22  2:42     ` Alasdair G Kergon
2007-11-27  1:51       ` Jun'ichi Nomura

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=4744E68C.3050601@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.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.