mirror of
				https://github.com/qemu/qemu.git
				synced 2025-10-31 12:07:31 +00:00 
			
		
		
		
	block/block-copy: fix s->copy_size for compressed cluster
0e2402452fallowed writes larger than cluster, but that's unsupported for compressed write. Fix it. Fixes:0e2402452fSigned-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20191029150934.26416-1-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
		
							parent
							
								
									407d22eb5b
								
							
						
					
					
						commit
						dcfbece684
					
				| @ -109,9 +109,9 @@ BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target, | ||||
|         s->use_copy_range = false; | ||||
|         s->copy_size = cluster_size; | ||||
|     } else if (write_flags & BDRV_REQ_WRITE_COMPRESSED) { | ||||
|         /* Compression is not supported for copy_range */ | ||||
|         /* Compression supports only cluster-size writes and no copy-range. */ | ||||
|         s->use_copy_range = false; | ||||
|         s->copy_size = MAX(cluster_size, BLOCK_COPY_MAX_BUFFER); | ||||
|         s->copy_size = cluster_size; | ||||
|     } else { | ||||
|         /*
 | ||||
|          * copy_range does not respect max_transfer (it's a TODO), so we factor | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Vladimir Sementsov-Ogievskiy
						Vladimir Sementsov-Ogievskiy