* The gendisk of raid can't be released
@ 2023-03-02 15:51 Xiao Ni
2023-03-03 2:53 ` Ming Lei
0 siblings, 1 reply; 3+ messages in thread
From: Xiao Ni @ 2023-03-02 15:51 UTC (permalink / raw)
To: Christoph Hellwig, Song Liu
Cc: linux-raid, linux-block, Ming Lei, Nigel Croxon
Hi Christoph
There is a regression problem which is introduced by 84d7d462b16d
(blk-cgroup: pin the gendisk in struct blkcg_gq).
The test commands below can reproduce this:
mdadm -CR /dev/md0 -l10 -n4 /dev/nvme[0-3]n1 --assume-clean
mdadm --stop /dev/md0
mdadm -CR /dev/md0 -l10 -n4 /dev/nvme[0-3]n1 --assume-clean
mdadm: Fail to create md0 when using
/sys/module/md_mod/parameters/new_array, fallback to creation via node
mdadm: unexpected failure opening /dev/md0
The reason is that the gendisk kobj can't be released, so md_free_disk
can't be called. It looks like the patch mentioned above doesn't have
problem. Before this patch, it didn't add the reference to the kobj of
the gendisk. So all things work well. Now it adds the reference to
the kobj of the gendisk in blkg_alloc, but it can't be decremented in
blkg_release. After adding some debug logs, it only adds the reference
of blkg->refcnt, but it doesn't call blkcg_rstat_flush which calls
percpu_ref_put.
So the patch 84d7d462b16d only exposes the reference problem in
block cgroup.
Best Regards
Xiao
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: The gendisk of raid can't be released
2023-03-02 15:51 The gendisk of raid can't be released Xiao Ni
@ 2023-03-03 2:53 ` Ming Lei
2023-03-03 8:51 ` Xiao Ni
0 siblings, 1 reply; 3+ messages in thread
From: Ming Lei @ 2023-03-03 2:53 UTC (permalink / raw)
To: Xiao Ni; +Cc: Christoph Hellwig, Song Liu, linux-raid, linux-block,
Nigel Croxon
On Thu, Mar 02, 2023 at 11:51:59PM +0800, Xiao Ni wrote:
> Hi Christoph
>
> There is a regression problem which is introduced by 84d7d462b16d
> (blk-cgroup: pin the gendisk in struct blkcg_gq).
The above commit has been reverted, can you test the latest linus tree?
Thanks,
Ming
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: The gendisk of raid can't be released
2023-03-03 2:53 ` Ming Lei
@ 2023-03-03 8:51 ` Xiao Ni
0 siblings, 0 replies; 3+ messages in thread
From: Xiao Ni @ 2023-03-03 8:51 UTC (permalink / raw)
To: Ming Lei; +Cc: Christoph Hellwig, Song Liu, linux-raid, linux-block,
Nigel Croxon
On Fri, Mar 3, 2023 at 10:54 AM Ming Lei <ming.lei@redhat.com> wrote:
>
> On Thu, Mar 02, 2023 at 11:51:59PM +0800, Xiao Ni wrote:
> > Hi Christoph
> >
> > There is a regression problem which is introduced by 84d7d462b16d
> > (blk-cgroup: pin the gendisk in struct blkcg_gq).
>
> The above commit has been reverted, can you test the latest linus tree?
>
>
> Thanks,
> Ming
>
Thanks for the information. I have tried with the latest linux-next version. The
problem doesn't appear anymore.
Best regards
Xiao
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-03 8:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-02 15:51 The gendisk of raid can't be released Xiao Ni
2023-03-03 2:53 ` Ming Lei
2023-03-03 8:51 ` Xiao Ni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).