On 04/04/2016 02:16 PM, Denis V. Lunev wrote: >> + The following request types are currently defined for the command: >> + >> + 1. Block provisioning state >> + >> + Upon receiving an `NBD_CMD_GET_LBA_STATUS` command with command flags >> + field set to `NBD_FLAG_GET_ALLOCATED` (0x0), the server MUST return >> + the provisioning state of the device. The following provisionnig states >> + are defined for the command: >> + >> + - `NBD_STATE_ALLOCATED` (0x0), LBA extent is present on the block device; >> + - `NBD_STATE_ZEROED` (0x1), LBA extent is present on the block device >> + and contains zeroes; >> + - `NBD_STATE_DEALLOCATED` (0x2), LBA extent is not present on the >> + block device. A client MUST NOT make any assumptions about the >> + contents of the extent. > we can add 'NBD_STATE_DIRTY_DEALLOCATED' (0x2) here as additional hint No, DEALLOCATED and HOLE are the same thing, and we really want the status to be a bitwise-OR of flags (bit 0: is it allocated or deallocated. bit 1: is it unknown content or all 0), rather than a set of 3 states, since it really is possible to have all four combinations of those two orthognal status information. That was one of the topics already hashed out in the v1 conversation, and fixed in v2. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org