Am 20.10.2026 um 00:22 hat Eric Blake geschrieben: > When exporting bitmaps over NBD, we previously required a user to pass > one '-B name' per bitmap, which they would have to use 'qemu-img info' > to learn the list of names to pass. More convenient is an option to > export all possible bitmaps at once, as discussed here [1]. > > Implementation-wise, mixing --all-bitmaps and -B is harmless (grabbing > all bitmap names already requires crawling the backing chain and > deduplicating, so either the -B name is already detected as a > duplicate from adding the name again, or it is an invalid name that > will still cause a later error about bitmap not found). I also tested > that mixing -s and --all-bitmaps still works (the temporary overlay > image to make -s work has no bitmaps of its own, so starting the crawl > for bitmap names at the original bs is just fine). > > Also, now that parallels can have bitmaps (and not just qcow2), a > slight doc wording change for -B is warranted. > > [1] https://lists.nongnu.org/archive/html/qemu-devel/2026-10/msg01234.html > > Signed-off-by: Eric Blake <[email protected]> > CC: Denis V. Lunev <[email protected]>
Thanks, applied to the block branch. One thing I noticed is that you check for duplicates in the new --all-bitmaps path, but in the existing -B path, nothing ever checks if the user specified the same bitmap twice. It seems to work fine even with adding the same bitmap twice, so I'm not really sure if making things consistent would mean dropping the checks for --all-bitmaps resulting in smaller code, or adding the check for -B resulting in less surprising state. But I think there is room for a cleanup patch on top of this. Kevin
