[dm-devel] device mapper target vs personality, how do you decide to pick one or the other?
John.Utz at wdc.com
Mon Jul 14 17:15:48 UTC 2014
Thankyou for the further clarification.
My apologies for not being clear about my end goal. Indeed, I do wish to do remapping because I am coding a ZAC simulator.
From: Mike Snitzer [snitzer at redhat.com]
Sent: Friday, July 11, 2014 5:36 PM
To: John Utz
Cc: dm-devel at redhat.com
Subject: Re: device mapper target vs personality, how do you decide to pick one or the other?
On Fri, Jul 11 2014 at 5:56pm -0400,
John Utz <John.Utz at wdc.com> wrote:
> Hi Mike
> tnx so much for the prompt response!
> sorry i wasnt clear enuf, example of the 'personality code' that i was
> writing about below.
> FOR EXAMPLE, here is a little bit of linear.c that contains it:
> static struct md_personality linear_personality =
> .name = "linear",
> .level = LEVEL_LINEAR,
> .owner = THIS_MODULE,
> .make_request = linear_make_request,
> .run = linear_run,
> .stop = linear_stop,
> .status = linear_status,
> .hot_add_disk = linear_add,
> .size = linear_size,
> static int __init linear_init (void)
> return register_md_personality (&linear_personality);
> static void linear_exit (void)
> unregister_md_personality (&linear_personality);
The above is MD raid code. So what you're talking about are the
different MD raid personalities.
> > so, based on this speculation, i *think* i should be using the target
> > construct for the new device mapper module that i am currently
> > coding.
> > am i correct?
The target construct is provided by DM. You haven;t said what you're
looking to do but if it is remapping IO and has nothing to do with raid
then you'd probably want to develop a new DM target.
More information about the dm-devel