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 ...



    Date:        Thu, 26 Nov 2015 23:50:36 +0000 (UTC)
    From:        mlelstv%serpens.de@localhost (Michael van Elst)
    Message-ID:  <n385sc$grr$2%serpens.de@localhost>

  | You need to copy the sector size from the underlying disk and you
  | need to fix a few cases where DEV_BSIZE is used for buffer sizes.

Yes, did that, that's what led to the panic in the earlier message...

I suspect (with no proof at all yet, so this might easily be wrong)
that the problem comes from the "disk driver translates" model.

For these purposes, cgd is a disk driver, it calls dk_start() and
that runs dk_translate() and the units get translated from the
original DEV_BSIZE (one presumes) into the cgd "device"'s 4K sector
units.

Then it calls the underlying device driver (the sd driver via umass in
my case) - that also expects to be receiving the data in DEV_BSIZE
units, and translates to the drive's 4K sector units.

That combination isn't good...

I was still in the process of instrumenting things to actually validate
(or disprove) this hypothesis when I got distracted by other stuff, and
put it all aside (and more or less forgot it for a while.)

kre



Home | Main Index | Thread Index | Old Index