Skip to content

Commit

Permalink
md: Remove deprecated CONFIG_MD_LINEAR
Browse files Browse the repository at this point in the history
md-linear has been marked as deprecated for 2.5 years. Remove it.

Cc: Christoph Hellwig <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: Guoqing Jiang <[email protected]>
Cc: Mateusz Grzonka <[email protected]>
Cc: Jes Sorensen <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
liu-song-6 committed Dec 19, 2023
1 parent ca294b3 commit 849d18e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 354 deletions.
13 changes: 0 additions & 13 deletions drivers/md/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,6 @@ config MD_BITMAP_FILE
various kernel APIs and can only work with files on a file system not
actually sitting on the MD device.

config MD_LINEAR
tristate "Linear (append) mode (deprecated)"
depends on BLK_DEV_MD
help
If you say Y here, then your multiple devices driver will be able to
use the so-called linear mode, i.e. it will combine the hard disk
partitions by simply appending one to the other.

To compile this as a module, choose M here: the module
will be called linear.

If unsure, say Y.

config MD_RAID0
tristate "RAID-0 (striping) mode"
depends on BLK_DEV_MD
Expand Down
6 changes: 2 additions & 4 deletions drivers/md/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ dm-zoned-y += dm-zoned-target.o dm-zoned-metadata.o dm-zoned-reclaim.o

md-mod-y += md.o md-bitmap.o
raid456-y += raid5.o raid5-cache.o raid5-ppl.o
linear-y += md-linear.o
multipath-y += md-multipath.o
faulty-y += md-faulty.o

# Note: link order is important. All raid personalities
# and must come before md.o, as they each initialise
# themselves, and md.o may use the personalities when it
# and must come before md.o, as they each initialise
# themselves, and md.o may use the personalities when it
# auto-initialised.

obj-$(CONFIG_MD_LINEAR) += linear.o
obj-$(CONFIG_MD_RAID0) += raid0.o
obj-$(CONFIG_MD_RAID1) += raid1.o
obj-$(CONFIG_MD_RAID10) += raid10.o
Expand Down
8 changes: 2 additions & 6 deletions drivers/md/md-autodetect.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ static int md_setup_ents __initdata;
* instead of just one. -- KTK
* 18May2000: Added support for persistent-superblock arrays:
* md=n,0,factor,fault,device-list uses RAID0 for device n
* md=n,-1,factor,fault,device-list uses LINEAR for device n
* md=n,device-list reads a RAID superblock from the devices
* elements in device-list are read by name_to_kdev_t so can be
* a hex number or something like /dev/hda1 /dev/sdb
Expand Down Expand Up @@ -88,18 +87,15 @@ static int __init md_setup(char *str)
md_setup_ents++;
switch (get_option(&str, &level)) { /* RAID level */
case 2: /* could be 0 or -1.. */
if (level == 0 || level == LEVEL_LINEAR) {
if (level == 0) {
if (get_option(&str, &factor) != 2 || /* Chunk Size */
get_option(&str, &fault) != 2) {
printk(KERN_WARNING "md: Too few arguments supplied to md=.\n");
return 0;
}
md_setup_args[ent].level = level;
md_setup_args[ent].chunk = 1 << (factor+12);
if (level == LEVEL_LINEAR)
pername = "linear";
else
pername = "raid0";
pername = "raid0";
break;
}
fallthrough;
Expand Down
318 changes: 0 additions & 318 deletions drivers/md/md-linear.c

This file was deleted.

2 changes: 1 addition & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -8124,7 +8124,7 @@ void md_error(struct mddev *mddev, struct md_rdev *rdev)
return;
mddev->pers->error_handler(mddev, rdev);

if (mddev->pers->level == 0 || mddev->pers->level == LEVEL_LINEAR)
if (mddev->pers->level == 0)
return;

if (mddev->degraded && !test_bit(MD_BROKEN, &mddev->flags))
Expand Down
Loading

0 comments on commit 849d18e

Please sign in to comment.