Skip to content

Conversation

kpd-daemon[bot]
Copy link

@kpd-daemon kpd-daemon bot commented Sep 11, 2025

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

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 <[email protected]>
@kpd-daemon
Copy link
Author

kpd-daemon bot commented Sep 11, 2025

Upstream branch: c17fb54
series: https://patchwork.kernel.org/project/linux-raid/list/?series=999784
version: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants