tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

add disk size to "struct disk"?

I think it would be useful to add the total disk size to the common
"struct disk". It could be used in wedge discovery to reject
partitions which don't fit into the usable disk space.

The reason I'm proposing this is that I just had a case where
such a check would avoid unexpected behavior: I've attached
a GPT-formatted disk (used with XenServer before) to a RAID
controller; since the controller (LSI9260-8i, supported by
the mfi(4) driver) doesn't support transparent mode it was
just added as a single-disk RAID0. This makes that the
controller cuts off some megabytes at the end.
The kernel did still attach dk devices, even for the last,
partially unaccessible, partition.
The gpt(8) tool was even worse - it refused to deal with the
disk completely, with a less helpful "bogus map" error message,
so that one can't even truncate or delete the last partition.
This would be the next thing to fix.

The first step would be to keep the kernel to attach
wedges to impossible partition entries. What do you think?

best regards

Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt

Kennen Sie schon unsere app?

Home | Main Index | Thread Index | Old Index