All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: Re: [PATCH 2/5] libdm-deptree-return-failure-suspend-children
Date: Sun, 22 Nov 2009 21:31:23 +0100	[thread overview]
Message-ID: <4B099F9B.7060200@redhat.com> (raw)
In-Reply-To: <20091121022631.GB32715@redhat.com>

Dne 21.11.2009 03:26, Mike Snitzer napsal(a):
> On Fri, Nov 20 2009 at  5:57pm -0500,
> Zdenek Kabelac <zkabelac@redhat.com> wrote:
> 
>> Dne 20.11.2009 22:29, Mike Snitzer napsal(a):
>>> Return error immediately to dm_tree_suspend_children() callers.
>>>
>>> Otherwise suspend_lv and its variants can fail silently.
>>>
>>> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
>>> ---
>>>  libdm/libdm-deptree.c |    5 +++--
>>>  1 files changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
>>> index bb10fe5..6f5355d 100644
>>> --- a/libdm/libdm-deptree.c
>>> +++ b/libdm/libdm-deptree.c
>>> @@ -1109,7 +1109,7 @@ int dm_tree_suspend_children(struct dm_tree_node *dnode,
>>>  			log_error("Unable to suspend %s (%" PRIu32
>>>  				  ":%" PRIu32 ")", name, info.major,
>>>  				  info.minor);
>>> -			continue;
>>> +			return 0;
>>>  		}
>>
>>
>> This is a bit hard to tell what's the right way here - either to continue
>> suspending  'the rest of the monster' or to stop with the first failure.
>>
>> In case of the replicator - when suspend of one head would fail - I would
>> probably prefer to see the code to continue suspending remaing heads.
> 
> OK, the other possibility that Alasdair and I discussed is that we could
> return failure once all nodes at the same level have been processed.
> 
> Would that work for replicator?  Are all heads at the same level in the tree?

Yes - that would probably work well for replicator (though the error in the
suspend as rather hypothetical in this case anyway)

But - still - is it the best thing to stop suspending elements from tree - if
one path fails?

Zdenek



  reply	other threads:[~2009-11-22 20:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 21:29 [PATCH 1/5] libdm-deptree-return-failure-activate-and-preload-children Mike Snitzer
2009-11-20 21:29 ` [PATCH 2/5] libdm-deptree-return-failure-suspend-children Mike Snitzer
2009-11-20 22:57   ` Zdenek Kabelac
2009-11-21  2:26     ` Mike Snitzer
2009-11-22 20:31       ` Zdenek Kabelac [this message]
2009-11-20 21:29 ` [PATCH 3/5] libdm-deptree-return-failure-deactivate-children Mike Snitzer
2009-11-20 21:29 ` [PATCH 4/5] lvm-stack-on-resume-and-suspend-failures Mike Snitzer
2009-11-20 23:11   ` Zdenek Kabelac
2009-11-20 21:29 ` [PATCH 5/5] lvm-stack-on-activate-and-deactivate-failures Mike Snitzer
2009-11-20 22:51 ` [PATCH 1/5] libdm-deptree-return-failure-activate-and-preload-children Zdenek Kabelac

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=4B099F9B.7060200@redhat.com \
    --to=zkabelac@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.