Eric Blake a7c18670b4 nbd/client: Accept 64-bit block status chunks
Once extended mode is enabled, we need to accept 64-bit status replies
(even for replies that don't exceed a 32-bit length).  It is easier to
normalize narrow replies into wide format so that the rest of our code
only has to handle one width.  Although a server is non-compliant if
it sends a 64-bit reply in compact mode, or a 32-bit reply in extended
mode, it is still easy enough to tolerate these mismatches.

In normal execution, we are only requesting "base:allocation" which
never exceeds 32 bits for flag values. But during testing with
x-dirty-bitmap, we can force qemu to connect to some other context
that might have 64-bit status bit; however, we ignore those upper bits
(other than mapping qemu:allocation-depth into something that
'qemu-img map --output=json' can expose), and since that only affects
testing, we really don't bother with checking whether more than the
two least-significant bits are set.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-ID: <20230925192229.3186470-22-eblake@redhat.com>
2023-10-05 11:02:08 -05:00
..
2023-09-08 13:08:52 +03:00
2023-02-24 15:09:39 +00:00
2023-09-21 09:31:28 -04:00
2023-09-08 13:08:52 +03:00
2023-05-30 17:37:26 +02:00
2023-09-21 09:05:10 -04:00
2023-09-08 13:08:52 +03:00
2023-06-01 07:34:03 -04:00
2023-09-08 13:08:52 +03:00
2023-09-29 08:13:57 +02:00
2023-05-30 17:37:26 +02:00
2023-09-08 13:08:52 +03:00
2023-09-08 13:08:52 +03:00