All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rajnoha <prajnoha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Fix segfault when using vgsplit in stacked environment
Date: Thu, 12 Feb 2009 10:03:28 +0100	[thread overview]
Message-ID: <4993E5E0.4060004@redhat.com> (raw)
In-Reply-To: <20090210181443.GB7582@agk.fab.redhat.com>

Alasdair G Kergon wrote:
> It is meaningless to call pv_uses_vg() if the PV does not exist.

Well, it's some kind of an exception, so I thought it would be
better to check it right here than all the other places outside
the function.

> And the function currently returns 0 if the answer is unknown - it'll
> get even more confusing if it returns 0 for some types of 'unknown'
> and 1 for other types!

Hmm, isn't it the opposite way? Looking at the dev_manager_device_uses_vg
function that is called from pv_uses_vg and returs its value,
dev_manager_device_uses_vg should return 1 if uncertain. So I relied on
this at that time... I return 1 when checking for NULL value of pv->dev,
because we can't decide if PV uses VG in this situation, too.

Peter



  reply	other threads:[~2009-02-12  9:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-09  7:53 [PATCH] Fix segfault when using vgsplit in stacked environment Peter Rajnoha
2009-02-09 12:24 ` Milan Broz
2009-02-10 18:14 ` Alasdair G Kergon
2009-02-12  9:03   ` Peter Rajnoha [this message]
2009-02-16 22:10   ` Petr Rockai

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=4993E5E0.4060004@redhat.com \
    --to=prajnoha@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.