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