From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSoo9-0002C7-MV for qemu-devel@nongnu.org; Tue, 03 Mar 2015 10:32:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSoo8-0006TH-GJ for qemu-devel@nongnu.org; Tue, 03 Mar 2015 10:32:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSoo8-0006TC-8h for qemu-devel@nongnu.org; Tue, 03 Mar 2015 10:32:28 -0500 Message-ID: <54F5CE31.4050602@redhat.com> Date: Tue, 03 Mar 2015 10:07:29 -0500 From: Max Reitz MIME-Version: 1.0 References: <1425379316-19639-1-git-send-email-pl@kamp.de> <1425379316-19639-6-git-send-email-pl@kamp.de> In-Reply-To: <1425379316-19639-6-git-send-email-pl@kamp.de> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 5/5] block/vpc: remove disabled code from get_sector_offset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org Cc: kwolf@redhat.com, carnold@suse.com, jcody@redhat.com, famz@redhat.com, stefanha@redhat.com 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 > --- > 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