History

md: reintroduce md-linear

THe md-linear is removed by commit 849d18e27be9 ("md: Remove deprecated CONFIG_MD_LINEAR") because it has been marked as deprecated for a long time. However, md-linear is used widely for underlying disks with different size, sadly we didn't know this until now, and it's true useful to create partitions and assemble multiple raid and then append one to the other. People have to use dm-linear in this case now, however, they will prefer to minimize the number of involved modules.

Yu Kuai committed 1 year ago

Commit 127186c1 parent e494e457 files · +379 −4Browse files

Showing the changes to include/uapi/linux/raid (2 of 7 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/raid/md_p.h +1 −1
  2. include/uapi/linux/raid/md_u.h +2 −0
include/uapi/linux/raid/md_p.h+1−1
@@ -233,7 +233,7 @@ struct mdp_superblock_1 { · 232 unmodified lines
233 char set_name[32]; /* set and interpreted by user-space */233 char set_name[32]; /* set and interpreted by user-space */
234 234
235 __le64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/235 __le64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/
236 __le32 level; /* 0,1,4,5 */236 __le32 level; /* 0,1,4,5, -1 (linear) */
237 __le32 layout; /* only for raid5 and raid10 currently */237 __le32 layout; /* only for raid5 and raid10 currently */
238 __le64 size; /* used size of component devices, in 512byte sectors */238 __le64 size; /* used size of component devices, in 512byte sectors */
239 239
include/uapi/linux/raid/md_u.h+2−0
@@ -103,6 +103,8 @@ typedef struct mdu_array_info_s { · 102 unmodified lines
103 103
104} mdu_array_info_t;104} mdu_array_info_t;
105 105
106#define LEVEL_LINEAR (-1)
107
106/* we need a value for 'no level specified' and 0108/* we need a value for 'no level specified' and 0
107 * means 'raid0', so we need something else. This is109 * means 'raid0', so we need something else. This is
108 * for internal use only110 * for internal use only