Alex Bligh <[email protected]> writes:

> --On 1 March 2012 17:17:41 +0100 Goswin von Brederlow
> <[email protected]> wrote:
>
>> There is an ioctl NBD_SET_BLKSIZE, which sets the lo->blksize. The only
> ...
>> Or did you mean that there should be a new ioctl NBD_SET_PHYS_BLKSIZE?
>
> No, I meant was there a non-nbd-specific block device ioctl to do this.
> Getting changes into nbd-client userspace code is (quite correctly) easier
> than getting them into the kernel.

Ahh, no idea. I wouldn't expect those values to be settable from
userspace for normal devices. They are something the driver sets to
reflet the hardware capabilities. But can't hurt to ask around.

On another note setting the physical block size does not prevent the
kernel to send requests aligned and sized to multiples of the logical
block size. Setting the logical block size to > 512 means that O_DIRECT
access needs to also use blocks >512 bytes. So for example "dd
if=/dev/zero of=/dev/nbd0 oflag=direct" fails but works if you add "bs=4k".

Can anyone think of other reasons why setting the logical block size
might be bad?

MfG
        Goswin

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to