qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH V3] block/iscsi: allow caching of t


From: Paolo Bonzini
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH V3] block/iscsi: allow caching of the allocation map
Date: Mon, 13 Jun 2016 11:53:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0


On 30/05/2016 08:33, Peter Lieven wrote:
> 
> The idea of the allocmap in cache.direct = on mode is that we can
> still speed up block jobs by skipping large unallocated areas. In this case
> the allocmap has only a hint character. If we don't know the status
> we issue a get_block_status request and verify the status. If its
> unallocated
> we return zeroes. If we new through an earlier get block status request
> that the area is allocated we can skip the useless get_block_status
> request.
> This is the old behaviour without this patch.

I'm adding a note like this:

diff --git a/block/iscsi.c b/block/iscsi.c
index fa03028..299b23c 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -523,6 +523,9 @@ static void
 iscsi_allocmap_set_unallocated(IscsiLun *iscsilun, int64_t sector_num,
                                int nb_sectors)
 {
+    /* Note: if cache.direct=on the third argument to iscsi_allocmap_update
+     * is ignored, so this will in effect be an iscsi_allocmap_set_invalid.
+     */
     iscsi_allocmap_update(iscsilun, sector_num, nb_sectors, false, true);
 }
 

Paolo



reply via email to

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