lkml.org 
[lkml]   [2023]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH - mdadm] mdopen: always try create_named_array()
On Thu, Mar 30, 2023 at 5:52 AM NeilBrown <neilb@suse.de> wrote:
>
> On Wed, 22 Mar 2023, NeilBrown wrote:
> > On Wed, 22 Mar 2023, Xiao Ni wrote:
> >
> > >
> > > Second, are there possibilities that the arguments "dev" and "name" of
> > > function create_mddev
> > > are null at the same time?
> >
> > No. For Build or Create, dev is never NULL. For Assemble and
> > Incremental, name is never NULL.
> >
>
> I should clarify this a bit. For Assemble and Incremental, "name" is
> never NULL *but* it might be an empty string.
> So:
> if (name && name[0] == 0)
> name = NULL;
>
> might cause it to become NULL. So you cannot assume there is always
> either a valid "dev" or a valid "name". "dev" might be NULL, and "name"
> might be "".
>
> NeilBrown
>

Hi Neil

The input argument name should be the metadata name. For incremental
and assemble, why are there possibilities that the metadata name is
invalid? A raid device should have a valid metadata name, right?


--
Best Regards
Xiao Ni

\
 
 \ /
  Last update: 2023-03-30 02:13    [W:0.384 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site