nbd: Refactor counting of metadata contexts
commit47ec485e8d5dba978126d31b9484d717ac1222ba
authorEric Blake <eblake@redhat.com>
Tue, 27 Oct 2020 05:05:51 +0000 (27 00:05 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 30 Oct 2020 20:10:15 +0000 (30 15:10 -0500)
tree3f6d4c2770b3134f85ab1e322ca152722999e4f3
parent02e87e3b1c77422b71855102b9cb884e4c7823f7
nbd: Refactor counting of metadata contexts

Rather than open-code the count of negotiated contexts at several
sites, embed it directly into the struct.  This will make it easier
for upcoming commits to support even more simultaneous contexts.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20201027050556.269064-7-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
nbd/server.c