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

Re: [Nbd] NBD blksize = 1024



> On 29 Aug 2016, at 20:49, Sitsofe Wheeler <sitsofe@...34...> wrote:
> 
> However, while nbd_dev's blksize is set to 1024 the bdev's own block
> size will presumably start out at something different (512?) and if the
> server doesn't choose to negotiate a different size it will remain at
> that size. Does anyone know why blksize was made to default to 1024

I think it just started that way and carried on.

> and
> is that just for things like size calculations or does it impact the
> minimum block size too?

The protocol-level minimum block size is 1 byte currently. IE an
nbd server is meant to support reads and writes at any offset.
Currently 1024 is merely a number built into the kernel client,
that (at least in theory) no server should rely on.

A proposal to fix it can be found in the 'INFO' extension. Specifically
look at:
  https://github.com/yoe/nbd/blob/extension-info/doc/proto.md
under "Block size constraints".

-- 
Alex Bligh







Reply to: