Re: [Nbd] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE
On 10 May 2016, at 16:45, Quentin Casasnovas <quentin.casasnovas@...57...> wrote:
> I'm by no mean an expert in this, but why would the kernel break up those
> TRIM commands? After all, breaking things up makes sense when the length
> of the request is big, not that much when it only contains the request
> header, which is the case for TRIM commands.
1. You are assuming that the only reason for limiting the size of operations is
limiting the data transferred within one request. That is not necessarily
the case. There are good reasons (if only orthogonality) to have limits
in place even where no data is transferred.
2. As and when the blocksize extension is implemented in the kernel (it isn't
now), the protocol requires it.
3. The maximum length of an NBD trim operation is 2^32. The maximum length
of a trim operation is larger. Therefore the kernel needs to do at least
some breaking up.
--
Alex Bligh
Reply to: