block: fix rustc migration error

This commit is contained in:
2026-01-06 18:17:11 +02:00
parent 57143f9d8d
commit 7abb950a8f
+5 -3
View File
@@ -59,7 +59,8 @@ impl DeviceMapper {
if !block_size.is_multiple_of(device.block_size()) {
log::error!(
"Couldn't create block mapper for {filesystem}: \
cache block size is not a multiple of device block size"
cache block size ({block_size}) is not a multiple of device block size ({})",
device.block_size()
);
return Err(Error::InvalidArgument);
}
@@ -171,10 +172,11 @@ impl BlockCache {
bucket_count: usize,
filesystem: &str,
) -> Result<Self, Error> {
if block_size.is_multiple_of(device.block_size()) {
if !block_size.is_multiple_of(device.block_size()) {
log::error!(
"Couldn't create block cache for {filesystem}: \
cache block size is not a multiple of device block size"
cache block size ({block_size}) is not a multiple of device block size ({})",
device.block_size()
);
return Err(Error::InvalidArgument);
}