> +DriveInfo *blk_legacy_dinfo(BlockBackend *blk) > +{ > + return blk->legacy_dinfo; > +} > + > +/* > + * Set @blk's DriveInfo to @dinfo, and return it. > + * @blk must not have a DriveInfo set already.
> + * No other BlockBackend may have the same DriveInfo set. Must we try to assert this ? This would require an extra linked list traversal but I don't think it's a performance path anyway. Reviewed-by: Benoît Canet <benoit.ca...@nodalink.com>