git: kernel: Assume s0 (compatibility slice) for any unformatted disk
Aaron LI
aly at crater.dragonflybsd.org
Thu Mar 5 04:35:12 PST 2026
commit b73d6e474c7b35d6ee6626f0443020ad40e2ebc6
Author: Aaron LI <aly at aaronly.me>
Date: Thu Mar 5 19:38:53 2026 +0800
kernel: Assume s0 (compatibility slice) for any unformatted disk
In commit 8cf8601ebae6a54f01fe9a7aed045832fc6a903b I changed the kernel
to ignore a disk without MBR or GPT, instead of assuming there is the
compatibility slice (s0) covering the whole disk. A later commit
f687b277b90809ae7df59f012ba2c7312b608545 only made a special case
for vn(4) disk because our nrelease procedure uses such a behavior.
This behavior change might cause real trouble for those users that
actually use the compatibility slice. A filesystem previously created
directly on an unformatted disk would disappear and unusable on the new
kernel. What's worse, there is no empty space at the disk beginning to
create a MBR for migration.
This partially reverts commit f687b277b90809ae7df59f012ba2c7312b608545
and brings back the s0 compatibility slice for any disk that doesn't
have a MBR/GPT header (i.e., unformatted disks).
While there, adjust the kernel message to be more descriptive.
See more discussion at: https://lists.dragonflybsd.org/pipermail/users/2026-March/452614.html
Summary of changes:
sys/dev/disk/vn/vn.c | 4 ++--
sys/kern/subr_diskmbr.c | 9 ++-------
sys/sys/disk.h | 6 +-----
sys/sys/param.h | 3 ++-
4 files changed, 7 insertions(+), 15 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b73d6e474c7b35d6ee6626f0443020ad40e2ebc6
--
DragonFly BSD source repository
More information about the Commits
mailing list