diff --git a/kernel/libk/src/device/block/cache.rs b/kernel/libk/src/device/block/cache.rs index 00a203cc..cff6143a 100644 --- a/kernel/libk/src/device/block/cache.rs +++ b/kernel/libk/src/device/block/cache.rs @@ -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 { - 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); }