WSL2-Linux-Kernel/block
Yu Kuai 3723091ea1 block: don't set GD_NEED_PART_SCAN if scan partition failed
Currently if disk_scan_partitions() failed, GD_NEED_PART_SCAN will still
set, and partition scan will be proceed again when blkdev_get_by_dev()
is called. However, this will cause a problem that re-assemble partitioned
raid device will creat partition for underlying disk.

Test procedure:

mdadm -CR /dev/md0 -l 1 -n 2 /dev/sda /dev/sdb -e 1.0
sgdisk -n 0:0:+100MiB /dev/md0
blockdev --rereadpt /dev/sda
blockdev --rereadpt /dev/sdb
mdadm -S /dev/md0
mdadm -A /dev/md0 /dev/sda /dev/sdb

Test result: underlying disk partition and raid partition can be
observed at the same time

Note that this can still happen in come corner cases that
GD_NEED_PART_SCAN can be set for underlying disk while re-assemble raid
device.

Fixes: e5cfefa97b ("block: fix scan partition for exclusively open device again")
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-06 20:41:53 -06:00
..
partitions driver core: make struct device_type.uevent() take a const * 2023-01-27 13:45:36 +01:00
Kconfig block: remove obsolete config BLOCK_COMPAT 2023-03-16 09:35:44 -06:00
Kconfig.iosched block: Default to use cgroup support for BFQ 2023-01-30 09:42:42 -07:00
Makefile
badblocks.c
bdev.c block: remove ->rw_page 2023-02-02 22:33:34 -08:00
bfq-cgroup.c for-6.3/block-2023-02-16 2023-02-20 14:27:21 -08:00
bfq-iosched.c block, bfq: fix uaf for 'stable_merge_bfqq' 2023-03-08 07:34:50 -07:00
bfq-iosched.h block, bfq: cleanup 'bfqg->online' 2023-02-07 10:20:59 -07:00
bfq-wf2q.c block, bfq: inject I/O to underutilized actuators 2023-01-29 15:18:33 -07:00
bio-integrity.c block: bio-integrity: Copy flags when bio_integrity_payload is cloned 2023-02-16 11:05:41 -07:00
bio.c block-6.3-2023-03-03 2023-03-03 10:21:39 -08:00
blk-cgroup-fc-appid.c
blk-cgroup-rwstat.c Revert "blk-cgroup: pin the gendisk in struct blkcg_gq" 2023-02-14 14:24:09 -07:00
blk-cgroup-rwstat.h
blk-cgroup.c for-6.3/block-2023-02-16 2023-02-20 14:27:21 -08:00
blk-cgroup.h Revert "blk-cgroup: pin the gendisk in struct blkcg_gq" 2023-02-14 14:24:09 -07:00
blk-core.c block: count 'ios' and 'sectors' when io is done for bio-based device 2023-03-15 09:25:04 -06:00
blk-crypto-fallback.c
blk-crypto-internal.h
blk-crypto-profile.c
blk-crypto-sysfs.c block: make kobj_type structures constant 2023-02-09 09:38:16 -07:00
blk-crypto.c
blk-flush.c
blk-ia-ranges.c block: make kobj_type structures constant 2023-02-09 09:38:16 -07:00
blk-integrity.c block: make kobj_type structures constant 2023-02-09 09:38:16 -07:00
blk-ioc.c
blk-iocost.c blk-iocost: Pass gendisk to ioc_refresh_params 2023-02-28 05:51:19 -07:00
blk-iolatency.c Revert "blk-cgroup: pin the gendisk in struct blkcg_gq" 2023-02-14 14:24:09 -07:00
blk-ioprio.c blk-cgroup: pass a gendisk to pd_alloc_fn 2023-02-03 08:20:05 -07:00
blk-ioprio.h
blk-lib.c
blk-map.c 46 fs/cifs (smb3 client) changesets, 37 in fs/cifs and 9 for related helper functions and cleanup outside from Dave Howells and Willy 2023-02-22 17:12:44 -08:00
blk-merge.c block-6.3-2023-03-03 2023-03-03 10:21:39 -08:00
blk-mq-cpumap.c blk-mq: Build default queue map via group_cpus_evenly() 2023-01-17 18:50:06 +01:00
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c blk-rq-qos: store a gendisk instead of request_queue in struct rq_qos 2023-02-03 08:20:05 -07:00
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-02-06 09:22:29 -07:00
blk-mq-sched.h
blk-mq-sysfs.c block: make kobj_type structures constant 2023-02-09 09:38:16 -07:00
blk-mq-tag.c
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c blk-mq: directly poll requests 2023-04-04 16:11:47 -06:00
blk-mq.h blk-mq: fix "bad unlock balance detected" on q->srcu in __blk_mq_run_dispatch_ops 2023-03-14 19:20:55 -06:00
blk-pm.c
blk-pm.h
blk-rq-qos.c blk-rq-qos: store a gendisk instead of request_queue in struct rq_qos 2023-02-03 08:20:05 -07:00
blk-rq-qos.h blk-rq-qos: store a gendisk instead of request_queue in struct rq_qos 2023-02-03 08:20:05 -07:00
blk-settings.c blk-wbt: move private information from blk-wbt.h to blk-wbt.c 2023-02-03 08:20:05 -07:00
blk-stat.c block: don't call blk_throtl_stat_add for non-READ/WRITE commands 2023-02-03 08:20:04 -07:00
blk-stat.h
blk-sysfs.c block: make kobj_type structures constant 2023-02-09 09:38:16 -07:00
blk-throttle.c Revert "blk-cgroup: pin the gendisk in struct blkcg_gq" 2023-02-14 14:24:09 -07:00
blk-throttle.h
blk-timeout.c
blk-wbt.c blk-rq-qos: store a gendisk instead of request_queue in struct rq_qos 2023-02-03 08:20:05 -07:00
blk-wbt.h blk-wbt: move private information from blk-wbt.h to blk-wbt.c 2023-02-03 08:20:05 -07:00
blk-zoned.c block: remove more NULL checks after bdev_get_queue() 2023-02-21 09:23:22 -07:00
blk.h blk-mq: enforce op-specific segment limits in blk_insert_cloned_request 2023-03-02 21:00:20 -07:00
bounce.c
bsg-lib.c
bsg.c
disk-events.c
elevator.c block: make kobj_type structures constant 2023-02-09 09:38:16 -07:00
elevator.h
fops.c block: don't allow multiple bios for IOCB_NOWAIT issue 2023-01-29 15:18:34 -07:00
genhd.c block: don't set GD_NEED_PART_SCAN if scan partition failed 2023-04-06 20:41:53 -06:00
holder.c
ioctl.c block: fix scan partition for exclusively open device again 2023-02-17 06:15:57 -07:00
ioprio.c
kyber-iosched.c
mq-deadline.c
opal_proto.h
sed-opal.c sed-opal: add support flag for SUM in status ioctl 2023-02-17 06:15:53 -07:00
t10-pi.c