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

[Nbd] Thoughts re INFO/BLOCKSIZE



Over the weekend I had some thoughts about BLOCKSIZE.

I want my server to be able to know if the client respects BLOCKSIZE constraints. If it does, I can make certain optimisations (an obvious one is opening with O_DIRECT as I know every request will be page aligned). As it happens that's not the only one.

Currently we code for doing this using NBD_OPT_BLOCKSIZE. Sending NBD_OPT_BLOCKSIZE means the client knows about and will respect block sizes.

However, INFO and BLOCKSIZE are part of the same extension (though Eric mentioned splitting them). I think it would simplify matters greatly if we simply said 'if you send INFO, you are deemed to understand and respect any BLOCKSIZE information that is sent back, and if you don't like it you can terminate the connection'. This would remove the NBD_OPT_BLOCKSIZE option. This would not prevent out-of-band provision of BLOCKSIZE information, just say that if it's provided inband that takes priority.

Thoughts?

-- 
Alex Bligh







Reply to: