The gendisk of raid can't be released

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

 



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




[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