From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 02/19] blk-cgroup: delay blk-cgroup initialization until add_disk Date: Wed, 8 Feb 2023 07:35:52 +0100 Message-ID: <20230208063552.GA15030@lst.de> References: <20230201134123.2656505-1-hch@lst.de> <20230201134123.2656505-3-hch@lst.de> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Ming Lei Cc: Christoph Hellwig , Jens Axboe , Tejun Heo , Josef Bacik , linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andreas Herrmann On Tue, Feb 07, 2023 at 10:40:32PM +0800, Ming Lei wrote: > because disk->root_blkg is freed & set as NULL in del_gendisk(). > > by the following script: > > modprobe -r scsi_debug > modprobe scsi_debug dev_size_mb=1024 > > mkfs.xfs -f /dev/sdc #suppose sdc is the scsi debug disk > mount /dev/sdc /mnt > echo 1 > /sys/block/sdc/device/delete > sleep 1 > umount /mnt Thank, I've sent a fix. Can you wire up your reproducer in blktests?