tech-kern archive

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

Re: add disk size to "struct disk"?



Le 30/04/12 19:29, Mouse a écrit :
do you expect the checks to be performed in userland, so anyone can
be free to have overlaps/overflows, or let the kernel do the checks
and return errors using the size obtained through disk(9)?
Overflowing is clearly bogus IMHO, and should not be allowed.

Does "not [] allowed" here mean "the table on disk is considered
invalid and ignored" or "the overflowing partition is suppressed" or
"the overflowing partition is clamped to the device size" or what?4

wedges have no existence on disk; granted, they are generated from on-disk data by discovery method (mbr, disklabel or gpt) but anyone is free to put whatever it wants in its mbr, disklabel or gpt tables. Wedges do not intervene when modifying these.

IMHO wedge creation should error out if the data it fetches from the on-disk structures is invalid (ex: the added wedge overflows current disk size), log it and let operator deal with it.

Of course, this does not replace integrity checks that can be performed on the on-disk data (CRC, hash, rendundant info, ...). Such a feature is orthogonal to wedges though.

--
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost


Home | Main Index | Thread Index | Old Index