qemu-io: Account for failed, invalid and flush operations