Re: [PATCH v2] block: fix kobject double initialization in add_disk

From: Yu Kuai
Date: Sun Aug 10 2025 - 21:04:37 EST


Hi,

在 2025/08/10 23:08, Christoph Hellwig 写道:
On Fri, Aug 08, 2025 at 01:36:09PM +0800, Zheng Qixing wrote:
From: Zheng Qixing <zhengqixing@xxxxxxxxxx>

Device-mapper can call add_disk() multiple times for the same gendisk
due to its two-phase creation process (dm create + dm load).

We'll need to fix that, instead of adding complex workarounds in the
block layer for something that should not happen.

AFAIK, a thorough will require complex refactor in the device mapper,
I feel it's better to fix the regression the easy way first, and it's
better for backport. Or do you have any suggestions how to fix this?

Thanks,
Kuai


.