acrn-kernel/block
Tao Su c36975a654 block: Skip destroyed blkg when restart in blkg_destroy_all()
[ Upstream commit 8176080d59 ]

Kernel hang in blkg_destroy_all() when total blkg greater than
BLKG_DESTROY_BATCH_SIZE, because of not removing destroyed blkg in
blkg_list. So the size of blkg_list is same after destroying a
batch of blkg, and the infinite 'restart' occurs.

Since blkg should stay on the queue list until blkg_free_workfn(),
skip destroyed blkg when restart a new round, which will solve this
kernel hang issue and satisfy the previous will to restart.

Reported-by: Xiangfei Ma <xiangfeix.ma@intel.com>
Tested-by: Xiangfei Ma <xiangfeix.ma@intel.com>
Tested-by: Farrah Chen <farrah.chen@intel.com>
Signed-off-by: Tao Su <tao1.su@linux.intel.com>
Fixes: f1c006f1c6 ("blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy()")
Suggested-and-reviewed-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20230428045149.1310073-1-tao1.su@linux.intel.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:53:33 +02:00
..
partitions
Kconfig
Kconfig.iosched
Makefile
badblocks.c
bdev.c
bfq-cgroup.c block, bfq: fix uaf for bfqq in bic_set_bfqq() 2023-02-09 11:28:06 +01:00
bfq-iosched.c block, bfq: fix uaf for bfqq in bic_set_bfqq() 2023-02-09 11:28:06 +01:00
bfq-iosched.h block, bfq: remove unused variable for bfq_queue 2022-10-20 05:46:49 -07:00
bfq-wf2q.c
bio-integrity.c block: bio-integrity: Copy flags when bio_integrity_payload is cloned 2023-03-10 09:32:46 +01:00
bio.c block: clear bio->bi_bdev when putting a bio back in the cache 2023-03-10 09:34:02 +01:00
blk-cgroup-fc-appid.c
blk-cgroup-rwstat.c
blk-cgroup-rwstat.h
blk-cgroup.c block: Skip destroyed blkg when restart in blkg_destroy_all() 2023-05-17 11:53:33 +02:00
blk-cgroup.h
blk-core.c block: be a bit more careful in checking for NULL bdev while polling 2023-03-10 09:34:02 +01:00
blk-crypto-fallback.c treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
blk-crypto-internal.h blk-mq: release crypto keyslot before reporting I/O complete 2023-05-11 23:03:00 +09:00
blk-crypto-profile.c blk-crypto: make blk_crypto_evict_key() more robust 2023-05-11 23:03:01 +09:00
blk-crypto-sysfs.c
blk-crypto.c blk-crypto: make blk_crypto_evict_key() more robust 2023-05-11 23:03:01 +09:00
blk-flush.c
blk-ia-ranges.c
blk-integrity.c
blk-ioc.c
blk-iocost.c block/blk-iocost (gcc13): keep large values in a new enum 2023-05-11 23:03:42 +09:00
blk-iolatency.c
blk-ioprio.c
blk-ioprio.h
blk-lib.c
blk-map.c
blk-merge.c blk-mq: release crypto keyslot before reporting I/O complete 2023-05-11 23:03:00 +09:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c blk-mq: correct stale comment of .get_budget 2023-03-10 09:32:44 +01:00
blk-mq-sched.h
blk-mq-sysfs.c blk-mq: fix possible memleak when register 'hctx' failed 2022-12-31 13:33:03 +01:00
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c blk-mq: don't plug for head insertions in blk_execute_rq_nowait 2023-05-11 23:03:22 +09:00
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c block: make blk_set_default_limits() private 2022-11-16 15:58:11 -07:00
blk-stat.c blk-stat: fix QUEUE_FLAG_STATS clear 2023-05-11 23:03:00 +09:00
blk-stat.h
blk-sysfs.c
blk-throttle.c blk-throttle: Fix that bps of child could exceed bps limited in parent 2023-04-13 16:55:37 +02:00
blk-throttle.h
blk-timeout.c
blk-wbt.c blk-wbt: fix that 'rwb->wc' is always set to 1 in wbt_init() 2022-10-09 07:48:16 -06:00
blk-wbt.h
blk-zoned.c
blk.h block: Revert "block: Do not reread partition table on exclusively open device" 2023-03-17 08:50:20 +01:00
bounce.c
bsg-lib.c
bsg.c
disk-events.c
elevator.c
elevator.h
fops.c block: don't allow multiple bios for IOCB_NOWAIT issue 2023-03-10 09:34:02 +01:00
genhd.c block: don't set GD_NEED_PART_SCAN if scan partition failed 2023-04-13 16:55:32 +02:00
holder.c
ioctl.c block: fix scan partition for exclusively open device again 2023-03-17 08:50:21 +01:00
ioprio.c
kyber-iosched.c
mq-deadline.c block: mq-deadline: Rename deadline_is_seq_writes() 2023-01-24 07:24:44 +01:00
opal_proto.h
sed-opal.c block: sed-opal: kmalloc the cmd/resp buffers 2022-11-08 07:14:35 -07:00
t10-pi.c