md: allow autodetection of superblock v1.x#245
Open
kpd-daemon[bot] wants to merge 1 commit into
Open
Conversation
Currently, md autodetect only supports version 0.90 superblocks. This patch enables the kernel to autodetect the version of the superblock during autodetection by trying which version succeeds loading. mdadm uses a similar approach. Version 1 superblocks don't store a preferred minor number, so one is picked from 0xffff downwards so it is unlikely to cause collisions. A new helper md_autodetect_bind_export_rdev is added for use in md_setup_drive in md_autodetect.c. It wraps bind_rdev_to_array() and export_rdev() to keep them private to md.c Updated md.rst to reflect the removed restriction. This has been tested with v0.90, v1.0-2 arrays both with assembly explicitly through md=... and automatic detection. This patch supersedes my previous submission sent on 2025-08-25: md: Allow setting persistent superblock version for md= command line Signed-off-by: Jeremias Stotter <jeremias@jears.at>
Author
|
Upstream branch: c17fb54 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: md: allow autodetection of superblock v1.x
version: 1
url: https://patchwork.kernel.org/project/linux-raid/list/?series=999784