[lvm-devel] [PATCH 8/9] Refactor vgsplit - reorder _vgsplit_from and _vgsplit_to based on flag.
Alasdair G Kergon
agk at redhat.com
Wed Sep 2 13:45:53 UTC 2009
On Thu, Aug 13, 2009 at 05:27:02PM -0400, Dave Wysochanski wrote:
> Should be no functional change but there is one bug. If we open the
> destination first, we cannot know the 'fmt'. So in this case we rely on the
> user specifying the value in the --metadatatype variable if the destination
> is a new VG.
That's OK because for most people now, it's always lvm2 format and the default
is correct, and everyone else quickly learns they need to use that option
sometimes.
> + /* FIXME: in this case we don't know the vg_from->fid->fmt */
> + if (!arg_count(cmd, metadatatype_ARG))
> + log_warn("Unable to set format based on "
> + "source VG format");
As elsewhere in the code, delete those lines and just use cmd->fmt directly.
Later, once you *do* know the correct format, verify it matches and if it
doesn't, abort with an error telling people to use that option.
Alasdair
More information about the lvm-devel
mailing list