]> git.proxmox.com Git - mirror_qemu.git/commit
vvfat: React to bdrv_is_allocated() errors
authorEric Blake <eblake@redhat.com>
Wed, 8 Mar 2017 21:34:28 +0000 (15:34 -0600)
committerKevin Wolf <kwolf@redhat.com>
Mon, 13 Mar 2017 11:49:33 +0000 (12:49 +0100)
commit6f712ee08036f4e8066cdddcfed288bf01914e55
tree3bfcd926750194275ca58e8bf0e69ada915627c7
parent666a9543fa957169b6e25805aac88ca72c08f0b5
vvfat: React to bdrv_is_allocated() errors

If bdrv_is_allocated() fails, we should react to that failure.
For 2 of the 3 callers, reporting the error was easy.  But in
cluster_was_modified() and its lone caller
get_cluster_count_for_direntry(), it's rather invasive to update
the logic to pass the error back; so there, I went with merely
documenting the issue by changing the return type to bool (in
all likelihood, treating the cluster as modified will then
trigger a read which will also fail, and eventually get to an
error - but given the appalling number of abort() calls in this
code, I'm not making it any worse).

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vvfat.c