Re: [PATCH 1/1] mdadm/Detail: Can't show container name correctly when unpluging disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 18, 2021 at 7:52 PM Tkaczyk, Mariusz
<mariusz.tkaczyk@xxxxxxxxxxxxxxx> wrote:
>
> There is a code:
>         if (create && !regular && !preferred) {
>                 static char buf[30]; <- this variable will survive retry.
>                 snprintf(buf, sizeof(buf), "%d:%d", major, minor);
>                 regular = buf;
>         }
> but seems that it is not a case for this scenario. I suspected that
> this was used because when gathering container name:
>
>                 container = map_dev_preferred(major(devid), minor(devid),
>                                               1, c->prefer);
>
> 'create' is explicitly set to 1. That is why I expect to have 'container'
> declared in static area. Make sense?
>

I c.

>
> >>
> >> This whole block should be moved from Detail() code to separate
> >> function, which determines if device or replacement is in sync.
> >
> > A good suggestion. Put it into the change I mentioned above, is it ok?
> >
> Agree. So, will you take care about all improvements later (after release)?
>

I plan to do this after you talk about them. If you want to fix them, I can help
to review too. I'll ping you when I'm ready to do this to check if you
start doing
it.

Best Regards
Xiao




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux