File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -323,16 +323,20 @@ fn print_missing_holes(
323
323
tx : ReadTransactionRef ,
324
324
values_file_entry : & walk:: Entry ,
325
325
block_size : u64 ,
326
- fragments : bool ,
326
+ print_fragments : bool ,
327
327
) -> anyhow:: Result < ( ) > {
328
328
let file_id = values_file_entry. file_id ( ) . unwrap ( ) ;
329
329
let mut last_hole_end = None ;
330
330
for FileRegion { start, length } in missing_holes ( tx, values_file_entry) ? {
331
331
if let Some ( last_hole_end) = last_hole_end {
332
332
assert ! ( start > last_hole_end) ;
333
333
}
334
+ // Determine if the hole fully occupies a punchable block.
335
+ let this_hole_startable_block = start. div_ceil ( block_size) ;
336
+ let this_hole_end_block = ( start + length) / block_size;
337
+ let partial = this_hole_startable_block >= this_hole_end_block;
334
338
last_hole_end = Some ( start + length) ;
335
- if !fragments && length < block_size {
339
+ if !print_fragments && partial {
336
340
continue ;
337
341
}
338
342
println ! (
You can’t perform that action at this time.
0 commit comments