On 05/04/2016 01:03, Eric Blake wrote: > > But while Alex and Denis were arguing that no one would ever query both > things at once (and therefore, it might be better to make > NBD_STATUS_HOLE and NBD_STATUS_CLEAN both be bit 0), your approach of > having two separate request flags and allowing both at once would mean > we do need to keep the status information separate (NBD_STATUS_HOLE is > bit 0, NBD_STATUS_CLEAN is bit 2).
I agree that querying both is messy. It would add complication to the implementation and the usecases are separate enough. Usually you would first query for dirtiness, and then perhaps ask for allocation status on the dirty areas. Getting back the allocation status on the clean areas would make the request unnecessarily larger. In addition, querying the dirtiness status should be extremely cheap, while querying the allocation status might be expensive depending on the underlying storage. Paolo
signature.asc
Description: OpenPGP digital signature