From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBxZy-0000yL-4M for qemu-devel@nongnu.org; Sun, 12 Jun 2016 01:04:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBxZw-000380-4r for qemu-devel@nongnu.org; Sun, 12 Jun 2016 01:04:57 -0400 Date: Sun, 12 Jun 2016 13:04:42 +0800 From: Fam Zheng Message-ID: <20160612050442.GJ27167@ad.usersys.redhat.com> References: <1464079240-24362-1-git-send-email-pl@kamp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464079240-24362-1-git-send-email-pl@kamp.de> Subject: Re: [Qemu-devel] [PATCH V3] block/iscsi: allow caching of the allocation map List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, pbonzini@redhat.com On Tue, 05/24 10:40, Peter Lieven wrote: > until now the allocation map was used only as a hint if a cluster > is allocated or not. If a block was not allocated (or Qemu had > no info about the allocation status) a get_block_status call was > issued to check the allocation status and possibly avoid > a subsequent read of unallocated sectors. If a block known to be > allocated the get_block_status call was omitted. In the other case > a get_block_status call was issued before every read to avoid > the necessity for a consistent allocation map. To avoid the > potential overhead of calling get_block_status for each and > every read request this took only place for the bigger requests. > > This patch enhances this mechanism to cache the allocation > status and avoid calling get_block_status for blocks where > the allocation status has been queried before. This allows > for bypassing the read request even for smaller requests and > additionally omits calling get_block_status for known to be > unallocated blocks. > > Signed-off-by: Peter Lieven > --- > v2->v3: - fix wording errors [Fam] > - reinit allocmap only if allocmap is present in > bdrv_reopen_commit I did an incremental review and the diff-of-diff looks good to me, so: Reviewed-by: Fam Zheng