qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 5/5] block/vpc: remove disabled code from get


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v2 5/5] block/vpc: remove disabled code from get_sector_offset
Date: Tue, 03 Mar 2015 10:07:29 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 2015-03-03 at 05:41, Peter Lieven wrote:
The code to check the bitmap for the allocation status of each sector
has been "disabled by reason" ever since the vpc driver existed.

The reason might be that we might end up reading sector by sector
in vpc_read if we really used it. This would be a performance desaster.

The current code would furthermore not work if the disabled parts get
reactivated since vpc_read and vpc_write only use get_sector_offset to
check the allocation status of the first sector of a read/write operation.
This might lead to sectors incorrectly treated as zero in vpc_read and
to sectors getting allocated twice in vpc_write.

Signed-off-by: Peter Lieven <address@hidden>
---
  block/vpc.c | 32 --------------------------------
  1 file changed, 32 deletions(-)

Awww, that code nearly had its ten-year anniversary. Too bad it won't live to see it (I hope...).

Reviewed-by: Max Reitz <address@hidden>



reply via email to

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