Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Increase OSF partition limit from 8 to 18

It turns out that while a maximum of 8 partitions may be what people
"should" have had, you can actually fit up to 18 entries(*) in a sector.

And some people clearly were taking advantage of that, like Michael
Cree, who had ten partitions on one of his OSF disks.

(*) The OSF partition data starts at byte offset 64 in the first sector,
and the array of 16-byte partition entries start at offset 148 in
the on-disk partition structure.

Reported-by: Michael Cree <mcree@orcon.net.nz>
Cc: stable@kernel.org (v2.6.38)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+1 -1
+1 -1
fs/partitions/osf.c
··· 10 10 #include "check.h" 11 11 #include "osf.h" 12 12 13 - #define MAX_OSF_PARTITIONS 8 13 + #define MAX_OSF_PARTITIONS 18 14 14 15 15 int osf_partition(struct parsed_partitions *state) 16 16 {