From: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
To: lvm-devel@redhat.com
Subject: [PATCH vgsplit 1/4] Add is_reserved_name() helper function.
Date: Mon, 24 Mar 2008 21:18:17 -0400 [thread overview]
Message-ID: <47E852D9.6040007@ce.jp.nec.com> (raw)
In-Reply-To: <20080324202434.586357085@redhat.com>
Hi,
> Very similar to apply_lvname_restrictions but without the error messages.
...
> +int is_reserved_name(const char *name)
> +{
> + if (!strncmp(name, "snapshot", 8))
> + return 1;
> +
> + if (!strncmp(name, "pvmove", 6))
> + return 1;
> +
> + if (strstr(name, "_mlog"))
> + return 1;
> +
> + if (strstr(name, "_mimage"))
> + return 1;
> +
> + return 0;
> +}
Having this function separately from apply_lvname_restrictions() is
error prone.
e.g. in future, adding a restriction to one but not for the other.
If only log_error() matters, how about adding 'verbose' parameter to
apply_lvname_restrictions() (or to this function) to control it?
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
next prev parent reply other threads:[~2008-03-25 1:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-24 20:23 [PATCH vgsplit 0/4] bz#251990: Move logical volume from one VG to another dwysocha
2008-03-24 20:23 ` [PATCH vgsplit 1/4] Add is_reserved_name() helper function dwysocha
2008-03-25 1:18 ` Jun'ichi Nomura [this message]
2008-03-24 20:23 ` [PATCH vgsplit 2/4] Update vgsplit to allow a list of LVs or PVs on the commandline dwysocha
2008-03-25 1:11 ` Jun'ichi Nomura
2008-03-24 20:23 ` [PATCH vgsplit 3/4] Update vgsplit man page to allow LVs or PVs on the cmdline dwysocha
2008-03-24 20:23 ` [PATCH vgsplit 4/4] Update vgsplit tests to cover LVs " dwysocha
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=47E852D9.6040007@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.