Re: [PATCH] rnull: fix bytes_to_sectors()

From: Andreas Hindborg

Date: Fri Dec 04 2026 - 08:56:44 EST


"Vitaly Wool" <vitaly.wool@xxxxxxxxxxx> writes:

> From: Igor Belousov <igor.b@xxxxxxxxx>
>
> bytes_to_sectors() shifts the byte count left by SECTOR_SHIFT instead of
> right, so it returns bytes * 512 * 512 instead of bytes / 512. Fix that.
>
> Signed-off-by: Igor Belousov <igor.b@xxxxxxxxx>
> Signed-off-by: Vitaly Wool <vitaly.wool@xxxxxxxxxxx>

This is not targeting upstream code.

Thanks for fixing this, I'll apply it to my rnull tree.

Best regards,
Andreas Hindborg