[Libguestfs] [PATCH] docs: Prefer 'cookie' over 'handle'

Nir Soffer nsoffer at redhat.com
Sat Mar 4 20:03:46 UTC 2023


On Sat, Mar 4, 2023 at 12:15 AM Eric Blake <eblake at redhat.com> wrote:
>
> In libnbd, we quickly learned that distinguishing between 'handle'
> (verb for acting on an object) and 'handle' (noun describing which
> object to act on) could get confusing; we solved it by renaming the
> latter to 'cookie'.  Copy that approach into the NBD spec, and make it
> obvious that a cookie is opaque data from the point of view of the
> server.

Good change, will make it easier to search code.

But the actual text does not make it clear that a cookie is opaque data from
point of view of the client. Maybe make this more clear?

> Makes no difference to implementations (other than older code
> still using 'handle' may be slightly harder to tie back to the spec).

To avoid confusion with older code that carefully used "handle" to match
the spec, maybe add a note that "cookie" was named "handle" before?

Nir



More information about the Libguestfs mailing list