lkml.org 
[lkml]   [2013]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dm: allow error target to replace either bio-based and request-based targets
On Thu, Aug 22 2013 at 11:14pm -0400,
Jun'ichi Nomura <j-nomura@ce.jp.nec.com> wrote:

> Hello Mike,
>
> On 08/23/13 09:17, Mike Snitzer wrote:
> >> I do like the idea of a single error target that is hybrid (supports
> >> both bio-based and request-based) but the DM core would need to be
> >> updated to support this.
> >>
> >> Specifically, we'd need to check if the device (and active table) is
> >> already bio-based or request-based and select the appropriate type. If
> >> it is a new device, default to selecting bio-based.
> >>
> >> There are some wrappers and other logic thoughout DM core that will need
> >> auditing too.
> >
> > Here is a patch that should work for your needs (I tested it to work
> > with 'dmsetup wipe_table' on both request-based and bio-based devices):
>
> How about moving the default handling in dm_table_set_type() outside of
> the for-each-target loop, like the modified patch below?
>
> For example, if a table has 2 targets, hybrid and request_based,
> and live_md_type is DM_TYPE_NONE, the table should be considered as
> request_based, not inconsistent.
> Though the end result is same as such a table is rejected by other
> constraint anyway, I think it's good to keep the semantics clean
> and error messages consistent.
>
> I.e. for the above case, the error message should be
> "Request-based dm doesn't support multiple targets yet",
> not "Inconsistent table: different target types can't be mixed up".

Hi,

Looks good, I'll fold your changes in and add your Signed-off-by.

Thanks,
Mike


\
 
 \ /
  Last update: 2013-08-23 12:21    [W:0.147 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site