Thread (14 messages) 14 messages, 2 authors, 2023-11-25

Re: [PATCH -next v2 1/6] md: remove useless debug code to print configuration

From: Song Liu <song@kernel.org>
Date: 2023-11-24 08:17:52
Also in: lkml

On Fri, Oct 20, 2023 at 7:25 PM Yu Kuai [off-list ref] wrote:
From: Yu Kuai <redacted>

One the one hand, print_conf() can be called without grabbing
'reconfig_mtuex' and current rcu protection to access rdev through 'conf'
is not safe. Fortunately, there is a separate rcu protection to access
rdev from 'mddev->disks', and rdev is always removed from 'conf' before
'mddev->disks'.

On the other hand, print_conf() is just used for debug,
and user can always grab such information(/proc/mdstat and mdadm).

There is no need to always enable this debug and try to fix misuse rcu
protection for accessing rdev from 'conf', hence remove print_conf().

Signed-off-by: Yu Kuai <redacted>
I wouldn't call these debug functions useless. There is probably some
users who use them for debugging (or even in some automations).
How hard is it to keep these functions? Can we just add some lockdep
to these functions to make sure they are called from safe places?

Thanks,
Song

[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help