Port-xen archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: xbd and large sectors
Manuel Bouyer <bouyer%antioche.eu.org@localhost> writes:
> the backend reports, for xbd0, 16777216 sectors, which we compute as
> 16777216 * 4k = 64G (and the same 8x larger for xbd1). So the number
> of sectors reported here are 512-bytes sectors, not 4k.
>
> Reading the linux sources, the xbd driver pass "sectors" directly to
> set_capacity(), which expects the disk size in 512-byte sectors, so
> the backend is doing what linux expects, and NetBSD is miscomputing
> the disk size when doing sectors * sector-size.
>
> A NetBSD dom0 will never report 4k sectors to the guest so we can just fix
> the frontend, and there's no backward compat issue.
>
> I will commit a fix to HEAD later today.
It seems to me that it is important for a 4K sector drive that is being
passed through as a phy: device to have that mirrored in xbd so that we
don't have the domU doing 512-byte writes needing RMW all the time.
I'm having trouble following your explanation as I'm not sure which
pieces are frontend and backend.
Do you mean that the xbd driver in a netbsd domU should:
respect the sector size
treat the #sectors as being in 512, and thus adjust them by
512/sector_size to get the true number of sectors?
or something else?
[I personally am trailing edge a bit and don't have a lot of 4K
experience, disks or displays :-) ]
Home |
Main Index |
Thread Index |
Old Index