block: Use CAFs when working with backing chains
commitdcf3f9b268a5c04bd94d721b81774092d7170cc4
authorMax Reitz <mreitz@redhat.com>
Wed, 12 Jun 2019 15:34:45 +0000 (12 17:34 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 7 Sep 2020 10:31:31 +0000 (7 12:31 +0200)
treedc3d1a3408f21fbbb3122e5e9e438d692a233e40
parent67acfd21885b70ae0cd11f12e34821be3d8b90bb
block: Use CAFs when working with backing chains

Use child access functions when iterating through backing chains so
filters do not break the chain.

In addition, bdrv_find_overlay() will now always return the actual
overlay; that is, it will never return a filter node but only one with a
COW backing file (there may be filter nodes between that node and @bs).

Signed-off-by: Max Reitz <mreitz@redhat.com>
block.c