qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 03/11] raw-posix: Don't "try harder" for BDRV_TY


From: Kevin Wolf
Subject: [Qemu-devel] Re: [PATCH 03/11] raw-posix: Don't "try harder" for BDRV_TYPE_CDROM
Date: Mon, 05 Jul 2010 17:31:06 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Thunderbird/3.0.4

Am 30.06.2010 13:55, schrieb Markus Armbruster:
> raw_pread_aligned() retries up to two times if the block device backs
> a virtual CD-ROM.  This makes no sense.  Whether retrying reads can
> correct read errors may depend on what we're reading, not on how the
> result gets used.
> 
> Also clean up gratuitous use of goto.
> 
> This reverts what's left of commit 8c05dbf9.
> 
> Signed-off-by: Markus Armbruster <address@hidden>

Are you sure that this won't cause a regression? I mean if there is a
patch specifically adding this behaviour, there probably was a problem
that made someone touch the code in the first place.

Arguably checking for the type hint is nonsense, however I think the
case for which this was written is passing through a real CD-ROM to a VM
- in which case the condition would be true anyway.

So instead of removing the code, the fix to achieve what was probably
intended is to check for bs->drv == &bdrv_host_cdrom.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]