All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Wysochanski <dwysocha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Update vg_create to use lvm_errno and return NULL upon error.
Date: Wed, 22 Jul 2009 16:16:21 -0400	[thread overview]
Message-ID: <1248293781.2441.83.camel@f10-node1> (raw)
In-Reply-To: <1248292346-14208-1-git-send-email-dwysocha@redhat.com>

On Wed, 2009-07-22 at 15:52 -0400, Dave Wysochanski wrote:
> We must update vgsplit and vgcreate at the same time or we break the
> nightly tests.
> 
> Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
> ---
> index 35c425a..158a532 100644
> --- a/tools/vgsplit.c
> +++ b/tools/vgsplit.c
> @@ -264,7 +264,7 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
>  	log_verbose("Checking for new volume group \"%s\"", vg_name_to);
>  	/*
>  	 * First try to create a new VG.  If we cannot create it,
> -	 * and we get FAILED_EXIST (we will not be holding a lock),
> +	 * and we get EEXIST (we will not be holding a lock),
>  	 * a VG must already exist with this name.  We then try to
>  	 * read the existing VG - the vgsplit will be into an existing VG.
>  	 *
> @@ -273,15 +273,12 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
>  	 * system.  Thus, the split will be into a new VG.
>  	 */
>  	vg_to = vg_create(cmd, vg_name_to);
> -	if (vg_read_error(vg_to) == FAILED_LOCKING) {
> -		log_error("Can't get lock for %s", vg_name_to);
> -		vg_release(vg_to);
> +	if (!vg_to && stored_errno() != EXIST) {

This is a silly typo - should be EEXIST.  I corrected this error in my
local repo and verified testsuite passes.





      reply	other threads:[~2009-07-22 20:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22 19:52 [PATCH] Update vg_create to use lvm_errno and return NULL upon error Dave Wysochanski
2009-07-22 20:16 ` Dave Wysochanski [this message]

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=1248293781.2441.83.camel@f10-node1 \
    --to=dwysocha@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.