tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: In-kernel units for block numbers, etc ...
jan.m.danielsson%gmail.com@localhost (Jan Danielsson) writes:
>On 27/11/15 00:20, Robert Elz wrote:
>[---]
>> Making the CGD believe its underlying sectors are 4K panics the system.
>> (That's about as far as I got, but I think the problem is related to
>> translation between units, being done when it shouldn't be.)
I've just committed a few fixes for disks with non-512byte sectors
to HEAD.
cgd now works on my drive with 1k sectors.
>make cgd binary compatible between 512 and 4096 byte sectors. I.e.
>don't make cgd actually process the entire 4K sectors in one go, but
>rather split it up into 8x512 byte operations; I assume the idea is that
>you should be able to dd a 512 byte sector drive to a 4KB sector drive
>and configuring a cgd device on it and mounting the partition should
>Just Work(tm).
The current code operates on full sectors and encodes the sector number
into the data.
Modifying this to encode multiple 512 byte blocks instead and using
block numbers instead of sector numbers looks straight forward to me.
We just have to decide if that is a good thing. Or maybe it needs to
be configurable?
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index