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

Re: [Nbd] fua, trim, etc



On 09/13/2011 09:54 AM, Alex Bligh wrote:
Paolo,

--On 13 September 2011 09:49:01 +0200 Paolo Bonzini
<pbonzini@...696...> wrote:

On 09/13/2011 09:47 AM, Folkert van Heusden wrote:
It might be a good way to get a flags-passing mechanism acceptable to
> Paul et al ready.
Will that change the protocol-handshake as currently implemented? E.g.
the 4 bytes with flags.

No, it's only in the kernel module side. I think Paul in the end agreed
about a new ioctl when I posted my TRIM patches to LKML.

Unless I'm missing something (quite possible):

1. The kernel module must not send TRIM requests to a server unless the
server can accept them.

2. Therefore the server must advertise it can support TRIM (somehow). This
requires a userspace change to the server.

3. As the negotiation is carried out by the userspace client, the userspace
client must support that negotiation, as well as make the ioctl() to
the kernel to turn (1) above on and off. That's a userspace change to
the client.

These are pretty minor (or in the case of (2) non-existent if you aren't
actually supporting TRIM on the default server), but still need to be
done I think.

Yeah, I misunderstood what Folkert wrote (or at least I wasn't clear enough). The protocol doesn't change, but just like FLUSH+FUA there is an additional flags bit that the server must set in order to enable the feature.

Paolo




Reply to: