Re: [PATCH] rnull: do not zero past the backing page

From: Andreas Hindborg

Date: Fri Dec 04 2026 - 09:04:48 EST


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

> When a read hits a backing page that was never written, rnull fills the
> segment with zeroes up to the end of the segment's current page, which
> is a page of the bio, not of the backing store. If the read does not
> start at the beginning of the backing page, the zeroes run on into the
> next backing page, which may hold data, and the read returns zeroes for
> it. For instance, with 512 byte blocks, a direct read of 4K at sector 7
> into a page aligned buffer, where only sector 8 was written, returns
> zeroes for sector 8. Fix this.
>
> Signed-off-by: Vitaly Wool <vitaly.wool@xxxxxxxxxxx>
> Assisted-By: Claude Opus 5.5 <noreply@xxxxxxxxxxxxx>

This patch is targeting a downstream tree.

It does not bother me that you send these to list, but it might be
confusing to others.

Best regards,
Andreas Hindborg