qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] block: add logical_block_size property


From: Christian Borntraeger
Subject: [Qemu-devel] Re: [PATCH] block: add logical_block_size property
Date: Thu, 4 Mar 2010 15:38:00 +0100
User-agent: KMail/1.12.4 (Linux/2.6.33-self-02454-g13dda80; KDE/4.3.4; x86_64; ; )

Am Donnerstag 04 März 2010 14:20:17 schrieb Christoph Hellwig:
> 
> Add a logical block size attribute as various guest side tools only
> increase the filesystem sector size based on it, not the advisory
> physical block size.
> 
> For scsi we already have support for a different logical block size
> in place for CDROMs that we can built upon.  Only my recent block
> device characteristics VPD page needs some fixups.  Note that we
> leave the logial block size for CDROMs hardcoded as the 2k value
> is expected for it in general.
> 
> For virtio-blk we already have a feature flag claiming to support
> a variable logical block size that was added for the s390 kuli
> hypervisor.  Interestingly it does not actually change the units
> in which the protocol works, which is still fixed at 512 bytes,
> but only communicates a different minimum I/O granularity.  So
> all we need to do in virtio is to add a trap for unaligned I/O
> and round down the device size to the next multiple of the logical
> block size.
> 
> IDE does not support any other logical block size than 512 bytes.

We did that because we wanted to use DASD devices, which have a 4k
block/sector size as backing for virtio. 512 byte request did work
(thanks to host page cache) but a single 512 byte write might have
triggered a 4k read and O_DIRECT accesses (avoiding host caching)
was also not working.

Testing and review is still in my todo list.

Christian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]