]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
block: Catch !bs->drv in bdrv_check()
authorMax Reitz <mreitz@redhat.com>
Thu, 7 Aug 2014 20:47:55 +0000 (22:47 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Aug 2014 13:07:16 +0000 (15:07 +0200)
commit908bcd540f489f7adf2d804347905b0025d808d3
tree9f4b14955426dfa57bcfb940fb46e3ba5d4b3c47
parenta42f8a3d05c5598cee893c9cf5ffeee48bacb83e
block: Catch !bs->drv in bdrv_check()

qemu-img check calls bdrv_check() twice if the first run repaired some
inconsistencies. If the first run however again triggered corruption
prevention (on qcow2) due to very bad inconsistencies, bs->drv may be
NULL afterwards. Thus, bdrv_check() should check whether bs->drv is set.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c