Thread (8 messages) flat view 8 messages, 3 authors, 2021-10-19

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

From: Xiao Ni <hidden>
Date: 2021-10-18 13:06:08

On Mon, Oct 18, 2021 at 7:52 PM Tkaczyk, Mariusz
[off-list ref] 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.
quoted
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help