[lvm-devel] [PATCH 1/4] Move guts of pvcreate into library area - prep for vgcreate.

Alasdair G Kergon agk at redhat.com
Tue Dec 2 02:43:13 UTC 2008


On Mon, Dec 01, 2008 at 09:26:08PM -0500, Dave Wysochanski wrote:
> If you're not saying let the app decide, then if we split the validation
> and the create APIs, the only way I can think of ensuring the app has
> called the validation before calling the create is to somehow store a
> "passed_validation" flag somewhere (maybe within struct cmd_context).
> Seems kinda messy though since the "passed_validation" would depend on
> the create parameters.
> Maybe there is another way but I don't see it.
 
Split the validation into optional validation and compulsory validation.
Offer separate library call(s) for the optional validation, but build
the compulsory validation into the main call(s).

Alasdair
-- 
agk at redhat.com




More information about the lvm-devel mailing list