History

md: add feature flag MD_FEATURE_RAID0_LAYOUT

Due to a bug introduced in Linux 3.14 we cannot determine the correctly layout for a multi-zone RAID0 array - there are two possibilities. It is possible to tell the kernel which to chose using a module parameter, but this can be clumsy to use. It would be best if the choice were recorded in the metadata. So add a feature flag for this purpose. If it is set, then the 'layout' field of the superblock is used to determine which layout to use. If this flag is not set, then mddev->layout gets set to -1, which causes the module parameter to be required.

NeilBrown committed 7 years ago

Commit 33f2c351 parent c84a1373 files · +18 −0Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/raid/md_p.h+2−0
@@ -329,6 +329,7 @@ struct mdp_superblock_1 { · 328 unmodified lines
329329 #define MD_FEATURE_JOURNAL 512 /* support write cache */
330330 #define MD_FEATURE_PPL 1024 /* support PPL */
331331 #define MD_FEATURE_MULTIPLE_PPLS 2048 /* support for multiple PPLs */
332+#define MD_FEATURE_RAID0_LAYOUT 4096 /* layout is meaningful for RAID0 */
332333 #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \
333334 |MD_FEATURE_RECOVERY_OFFSET \
334335 |MD_FEATURE_RESHAPE_ACTIVE \
@@ -341,6 +342,7 @@ struct mdp_superblock_1 { · 6 unmodified lines
341342 |MD_FEATURE_JOURNAL \
342343 |MD_FEATURE_PPL \
343344 |MD_FEATURE_MULTIPLE_PPLS \
345+ |MD_FEATURE_RAID0_LAYOUT \
344346 )
345347
346348 struct r5l_payload_header {