mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Fix off-by-one bug in range tree code
Without this fix, zfs_range_tree_find_in could return an overlap when the found range starts immediately after the searched range, with no actual overlap. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Closes #17363
This commit is contained in:
		
							parent
							
								
									64e77fdf3b
								
							
						
					
					
						commit
						b9324a1e75
					
				| @ -659,7 +659,7 @@ zfs_range_tree_find_in(zfs_range_tree_t *rt, uint64_t start, uint64_t size, | ||||
| 	} | ||||
| 
 | ||||
| 	rs = zfs_btree_next(&rt->rt_root, &where, &where); | ||||
| 	if (rs == NULL || zfs_rs_get_start(rs, rt) > start + size) | ||||
| 	if (rs == NULL || zfs_rs_get_start(rs, rt) >= start + size) | ||||
| 		return (B_FALSE); | ||||
| 
 | ||||
| 	*ostart = zfs_rs_get_start(rs, rt); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Paul Dagnelie
						Paul Dagnelie