Skip to content

Commit

Permalink
Return true from extend_thin_meta_device less
Browse files Browse the repository at this point in the history
Return true only if the method returned without error AND the amount to
extend is non-zero.

This is the same condition already used in extend_thin_data_device.

Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Jul 10, 2024
1 parent 4dda0c3 commit c75bd89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/engine/strat_engine/thinpool/thinpool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,10 @@ impl ThinPool {
meta_growth,
);

(ext.is_ok(), ext)
match ext {
Ok(Sectors(0)) | Err(_) => (false, ext),
Ok(_) => (true, ext),
}
} else {
(false, Ok(Sectors(0)))
}
Expand Down

0 comments on commit c75bd89

Please sign in to comment.