Commit d8730f0c authored by Song Liu's avatar Song Liu

md: Remove deprecated CONFIG_MD_MULTIPATH

md-multipath has been marked as deprecated for 2.5 years. Remove it.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Neil Brown <neilb@suse.de>
Cc: Guoqing Jiang <guoqing.jiang@linux.dev>
Cc: Mateusz Grzonka <mateusz.grzonka@intel.com>
Cc: Jes Sorensen <jes@trained-monkey.org>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20231214222107.2016042-3-song@kernel.org
parent 849d18e2
...@@ -159,17 +159,6 @@ config MD_RAID456 ...@@ -159,17 +159,6 @@ config MD_RAID456
If unsure, say Y. If unsure, say Y.
config MD_MULTIPATH
tristate "Multipath I/O support (deprecated)"
depends on BLK_DEV_MD
help
MD_MULTIPATH provides a simple multi-path personality for use
the MD framework. It is not under active development. New
projects should consider using DM_MULTIPATH which has more
features and more testing.
If unsure, say N.
config MD_FAULTY config MD_FAULTY
tristate "Faulty test module for MD (deprecated)" tristate "Faulty test module for MD (deprecated)"
depends on BLK_DEV_MD depends on BLK_DEV_MD
......
...@@ -29,7 +29,6 @@ dm-zoned-y += dm-zoned-target.o dm-zoned-metadata.o dm-zoned-reclaim.o ...@@ -29,7 +29,6 @@ dm-zoned-y += dm-zoned-target.o dm-zoned-metadata.o dm-zoned-reclaim.o
md-mod-y += md.o md-bitmap.o md-mod-y += md.o md-bitmap.o
raid456-y += raid5.o raid5-cache.o raid5-ppl.o raid456-y += raid5.o raid5-cache.o raid5-ppl.o
multipath-y += md-multipath.o
faulty-y += md-faulty.o faulty-y += md-faulty.o
# Note: link order is important. All raid personalities # Note: link order is important. All raid personalities
...@@ -41,7 +40,6 @@ obj-$(CONFIG_MD_RAID0) += raid0.o ...@@ -41,7 +40,6 @@ obj-$(CONFIG_MD_RAID0) += raid0.o
obj-$(CONFIG_MD_RAID1) += raid1.o obj-$(CONFIG_MD_RAID1) += raid1.o
obj-$(CONFIG_MD_RAID10) += raid10.o obj-$(CONFIG_MD_RAID10) += raid10.o
obj-$(CONFIG_MD_RAID456) += raid456.o obj-$(CONFIG_MD_RAID456) += raid456.o
obj-$(CONFIG_MD_MULTIPATH) += multipath.o
obj-$(CONFIG_MD_FAULTY) += faulty.o obj-$(CONFIG_MD_FAULTY) += faulty.o
obj-$(CONFIG_MD_CLUSTER) += md-cluster.o obj-$(CONFIG_MD_CLUSTER) += md-cluster.o
obj-$(CONFIG_BCACHE) += bcache/ obj-$(CONFIG_BCACHE) += bcache/
......
This diff is collapsed.
...@@ -1287,17 +1287,11 @@ static int super_90_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor ...@@ -1287,17 +1287,11 @@ static int super_90_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor
rdev->sb_size = MD_SB_BYTES; rdev->sb_size = MD_SB_BYTES;
rdev->badblocks.shift = -1; rdev->badblocks.shift = -1;
if (sb->level == LEVEL_MULTIPATH)
rdev->desc_nr = -1;
else
rdev->desc_nr = sb->this_disk.number; rdev->desc_nr = sb->this_disk.number;
/* not spare disk, or LEVEL_MULTIPATH */ /* not spare disk */
if (sb->level == LEVEL_MULTIPATH || if (rdev->desc_nr >= 0 && rdev->desc_nr < MD_SB_DISKS &&
(rdev->desc_nr >= 0 && sb->disks[rdev->desc_nr].state & ((1<<MD_DISK_SYNC) | (1 << MD_DISK_ACTIVE)))
rdev->desc_nr < MD_SB_DISKS &&
sb->disks[rdev->desc_nr].state &
((1<<MD_DISK_SYNC) | (1 << MD_DISK_ACTIVE))))
spare_disk = false; spare_disk = false;
if (!refdev) { if (!refdev) {
...@@ -1444,20 +1438,19 @@ static int super_90_validate(struct mddev *mddev, struct md_rdev *freshest, stru ...@@ -1444,20 +1438,19 @@ static int super_90_validate(struct mddev *mddev, struct md_rdev *freshest, stru
return 0; return 0;
} }
if (mddev->level != LEVEL_MULTIPATH) {
desc = sb->disks + rdev->desc_nr; desc = sb->disks + rdev->desc_nr;
if (desc->state & (1<<MD_DISK_FAULTY)) if (desc->state & (1<<MD_DISK_FAULTY))
set_bit(Faulty, &rdev->flags); set_bit(Faulty, &rdev->flags);
else if (desc->state & (1<<MD_DISK_SYNC) /* && else if (desc->state & (1<<MD_DISK_SYNC)) {
desc->raid_disk < mddev->raid_disks */) {
set_bit(In_sync, &rdev->flags); set_bit(In_sync, &rdev->flags);
rdev->raid_disk = desc->raid_disk; rdev->raid_disk = desc->raid_disk;
rdev->saved_raid_disk = desc->raid_disk; rdev->saved_raid_disk = desc->raid_disk;
} else if (desc->state & (1<<MD_DISK_ACTIVE)) { } else if (desc->state & (1<<MD_DISK_ACTIVE)) {
/* active but not in sync implies recovery up to /* active but not in sync implies recovery up to
* reshape position. We don't know exactly where * reshape position. We don't know exactly where
* that is, so set to zero for now */ * that is, so set to zero for now
*/
if (mddev->minor_version >= 91) { if (mddev->minor_version >= 91) {
rdev->recovery_offset = 0; rdev->recovery_offset = 0;
rdev->raid_disk = desc->raid_disk; rdev->raid_disk = desc->raid_disk;
...@@ -1467,8 +1460,6 @@ static int super_90_validate(struct mddev *mddev, struct md_rdev *freshest, stru ...@@ -1467,8 +1460,6 @@ static int super_90_validate(struct mddev *mddev, struct md_rdev *freshest, stru
set_bit(WriteMostly, &rdev->flags); set_bit(WriteMostly, &rdev->flags);
if (desc->state & (1<<MD_DISK_FAILFAST)) if (desc->state & (1<<MD_DISK_FAILFAST))
set_bit(FailFast, &rdev->flags); set_bit(FailFast, &rdev->flags);
} else /* MULTIPATH are always insync */
set_bit(In_sync, &rdev->flags);
return 0; return 0;
} }
...@@ -1758,9 +1749,6 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_ ...@@ -1758,9 +1749,6 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_
&& rdev->new_data_offset < sb_start + (rdev->sb_size/512)) && rdev->new_data_offset < sb_start + (rdev->sb_size/512))
return -EINVAL; return -EINVAL;
if (sb->level == cpu_to_le32(LEVEL_MULTIPATH))
rdev->desc_nr = -1;
else
rdev->desc_nr = le32_to_cpu(sb->dev_number); rdev->desc_nr = le32_to_cpu(sb->dev_number);
if (!rdev->bb_page) { if (!rdev->bb_page) {
...@@ -1814,12 +1802,10 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_ ...@@ -1814,12 +1802,10 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_
sb->level != 0) sb->level != 0)
return -EINVAL; return -EINVAL;
/* not spare disk, or LEVEL_MULTIPATH */ /* not spare disk */
if (sb->level == cpu_to_le32(LEVEL_MULTIPATH) || if (rdev->desc_nr >= 0 && rdev->desc_nr < le32_to_cpu(sb->max_dev) &&
(rdev->desc_nr >= 0 &&
rdev->desc_nr < le32_to_cpu(sb->max_dev) &&
(le16_to_cpu(sb->dev_roles[rdev->desc_nr]) < MD_DISK_ROLE_MAX || (le16_to_cpu(sb->dev_roles[rdev->desc_nr]) < MD_DISK_ROLE_MAX ||
le16_to_cpu(sb->dev_roles[rdev->desc_nr]) == MD_DISK_ROLE_JOURNAL))) le16_to_cpu(sb->dev_roles[rdev->desc_nr]) == MD_DISK_ROLE_JOURNAL))
spare_disk = false; spare_disk = false;
if (!refdev) { if (!refdev) {
...@@ -1862,6 +1848,7 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *freshest, struc ...@@ -1862,6 +1848,7 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *freshest, struc
{ {
struct mdp_superblock_1 *sb = page_address(rdev->sb_page); struct mdp_superblock_1 *sb = page_address(rdev->sb_page);
__u64 ev1 = le64_to_cpu(sb->events); __u64 ev1 = le64_to_cpu(sb->events);
int role;
rdev->raid_disk = -1; rdev->raid_disk = -1;
clear_bit(Faulty, &rdev->flags); clear_bit(Faulty, &rdev->flags);
...@@ -1977,8 +1964,7 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *freshest, struc ...@@ -1977,8 +1964,7 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *freshest, struc
/* just a hot-add of a new device, leave raid_disk at -1 */ /* just a hot-add of a new device, leave raid_disk at -1 */
return 0; return 0;
} }
if (mddev->level != LEVEL_MULTIPATH) {
int role;
if (rdev->desc_nr < 0 || if (rdev->desc_nr < 0 ||
rdev->desc_nr >= le32_to_cpu(sb->max_dev)) { rdev->desc_nr >= le32_to_cpu(sb->max_dev)) {
role = MD_DISK_ROLE_SPARE; role = MD_DISK_ROLE_SPARE;
...@@ -2015,7 +2001,7 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *freshest, struc ...@@ -2015,7 +2001,7 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *freshest, struc
} else { } else {
role = le16_to_cpu(sb->dev_roles[rdev->desc_nr]); role = le16_to_cpu(sb->dev_roles[rdev->desc_nr]);
} }
switch(role) { switch (role) {
case MD_DISK_ROLE_SPARE: /* spare */ case MD_DISK_ROLE_SPARE: /* spare */
break; break;
case MD_DISK_ROLE_FAULTY: /* faulty */ case MD_DISK_ROLE_FAULTY: /* faulty */
...@@ -2057,8 +2043,6 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *freshest, struc ...@@ -2057,8 +2043,6 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *freshest, struc
set_bit(FailFast, &rdev->flags); set_bit(FailFast, &rdev->flags);
if (le32_to_cpu(sb->feature_map) & MD_FEATURE_REPLACEMENT) if (le32_to_cpu(sb->feature_map) & MD_FEATURE_REPLACEMENT)
set_bit(Replacement, &rdev->flags); set_bit(Replacement, &rdev->flags);
} else /* MULTIPATH are always insync */
set_bit(In_sync, &rdev->flags);
return 0; return 0;
} }
...@@ -2876,10 +2860,6 @@ void md_update_sb(struct mddev *mddev, int force_change) ...@@ -2876,10 +2860,6 @@ void md_update_sb(struct mddev *mddev, int force_change)
} else } else
pr_debug("md: %pg (skipping faulty)\n", pr_debug("md: %pg (skipping faulty)\n",
rdev->bdev); rdev->bdev);
if (mddev->level == LEVEL_MULTIPATH)
/* only need to write one superblock... */
break;
} }
if (md_super_wait(mddev) < 0) if (md_super_wait(mddev) < 0)
goto rewrite; goto rewrite;
...@@ -3880,12 +3860,7 @@ static int analyze_sbs(struct mddev *mddev) ...@@ -3880,12 +3860,7 @@ static int analyze_sbs(struct mddev *mddev)
continue; continue;
} }
} }
if (mddev->level == LEVEL_MULTIPATH) { if (rdev->raid_disk >= (mddev->raid_disks - min(0, mddev->delta_disks)) &&
rdev->desc_nr = i++;
rdev->raid_disk = rdev->desc_nr;
set_bit(In_sync, &rdev->flags);
} else if (rdev->raid_disk >=
(mddev->raid_disks - min(0, mddev->delta_disks)) &&
!test_bit(Journal, &rdev->flags)) { !test_bit(Journal, &rdev->flags)) {
rdev->raid_disk = -1; rdev->raid_disk = -1;
clear_bit(In_sync, &rdev->flags); clear_bit(In_sync, &rdev->flags);
......
...@@ -233,7 +233,7 @@ struct mdp_superblock_1 { ...@@ -233,7 +233,7 @@ struct mdp_superblock_1 {
char set_name[32]; /* set and interpreted by user-space */ char set_name[32]; /* set and interpreted by user-space */
__le64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/ __le64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/
__le32 level; /* -4 (multipath), 0,1,4,5 */ __le32 level; /* 0,1,4,5 */
__le32 layout; /* only for raid5 and raid10 currently */ __le32 layout; /* only for raid5 and raid10 currently */
__le64 size; /* used size of component devices, in 512byte sectors */ __le64 size; /* used size of component devices, in 512byte sectors */
......
...@@ -104,7 +104,6 @@ typedef struct mdu_array_info_s { ...@@ -104,7 +104,6 @@ typedef struct mdu_array_info_s {
} mdu_array_info_t; } mdu_array_info_t;
/* non-obvious values for 'level' */ /* non-obvious values for 'level' */
#define LEVEL_MULTIPATH (-4)
#define LEVEL_FAULTY (-5) #define LEVEL_FAULTY (-5)
/* we need a value for 'no level specified' and 0 /* we need a value for 'no level specified' and 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment