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

Re: [Nbd] Setting the physical block size

Alex Bligh <alex@...872...> writes:

> --On 1 March 2012 10:04:13 +0100 Goswin von Brederlow
> <goswin-v-b@...186...> wrote:
>> below is a patch that makes the nbd kernel driver set the physical block
>> size of the device to the blocksize specified by the client.
> Can this be done via an ioctl from nbd-client?
> -- 
> Alex Bligh

There is an ioctl NBD_SET_BLKSIZE, which sets the lo->blksize. The only
use of this seems to be to make the size of the nbd device a multiple of
the blocksize. I guess setting the physical block size could be moved
into the ioctl instead of doing it in nbd_do_it(). But then it would
have to be done twice, once when setting the default blocksize (1024)
and once in the ioctl.

Or did you mean that there should be a new ioctl NBD_SET_PHYS_BLKSIZE?
If we go that way then I would prefer a NBD_SET_GEOMETRY that sets all
the geometry infos (logical / physical block size, alignment offset,
rotational, ...) in a single call and introduce a handshake option to
communicate the disks geometry from server to client.


Reply to: