tech-kern archive

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

Re: vnode_has_large_blocks() (vnd.c rev 1.255)



bouyer%antioche.eu.org@localhost (Manuel Bouyer) writes:

>thinking about it more, I think this is the wrong approach. For example,
>if the vnd is for a linux domU, getdisksize() won't return anything
>usefull, but the I/O will probably be 4k-compatible. Even for a NetBSD domU,
>as the xbd protocol uses 512-bytes sectors, the disklabel will always contains
>512, even if the filesystem is properly aligned and uses 4k fragments.

The xbd protocol is a different problem. I know that the current code
always tells the DomU that the disk has 512-byte sectors which means
that the Dom0 must provide a device that allows 512-byte I/O. It would
really be better if xbd wasn't lying about the geometry.

>Worse, even if the disklabel contains 4k sectors, the xbd protocol may split
>an I/O in 2 parts that are not 4k aligned.
>I think the check should be made at I/O time. It will be cheaper than an
>unneeded read/modify/write I/O anyway.

If the underlying device only does 4k I/O then something smaller either fails
or needs read/modify/write on some layer.

In any case, I'll check why vnd doesn't use the optimized path when possible.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index