From: Peder Bergan via B4 Relay <devnull+peder.bergan.gmail.com@kernel.org>
To: Andreas Hindborg <a.hindborg@kernel.org>, Jens Axboe <axboe@kernel.dk>
Cc: Boqun Feng <boqun@kernel.org>,
linux-block@vger.kernel.org, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH RFC v2 0/2] block: rnull: Fix hole reads and uncached discard coverage
Date: Mon, 30 Nov 2026 12:04:46 +0100 [thread overview]
Message-ID: <20261130-fix-rnull-memory-backed-correctness-v2-0-250755ece813@gmail.com> (raw)
This RFC is based on Andreas Hindborg's rnull-v7.4-rc2 feature
branch at 9c0fceca4feed.
A read that starts in an unwritten backing page can return zeroes
for data in the next page. Stop the zero fill at the backing-page
boundary and look up the next page.
A configfs device can retain its backing storage across a logical
block size change. Track uncached occupancy in 512-byte sectors so
partial discards preserve data outside the discarded range and free
each page when its last occupied sector is discarded.
---
OpenAI Codex assisted with coding and testing.
---
Changes in v2:
- Drop the cached discard stride change from patch 2 after Sashiko
pointed out the mismatch with cached occupancy tracking. Patch 2
now addresses uncached discard coverage only.
- v1: https://lore.kernel.org/rust-for-linux/20261130-fix-rnull-memory-backed-correctness-v1-0-ff16977610c0@gmail.com/
---
Peder Bergan (2):
block: rnull: stop zero-filling at the backing page boundary
block: rnull: track uncached discard coverage by sector
drivers/block/rnull/disk_storage.rs | 40 +++++++++++++++++++++++++-------
drivers/block/rnull/disk_storage/page.rs | 16 +++++++++++++
drivers/block/rnull/rnull.rs | 39 +++++++++++++++++--------------
3 files changed, 69 insertions(+), 26 deletions(-)
---
base-commit: 9c0fceca4feed5f1056f55abe9c7c70731402776
change-id: 20261130-fix-rnull-memory-backed-correctness-a7d95f64ab7e
Best regards,
--
Peder Bergan <peder.bergan@gmail.com>
next reply other threads:[~2026-11-30 11:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <f_e360qdKgdE7zFpZt3Por-bXWTYnkqqVuWpKBq7tl390jTLK3PxFTEOk4T22t4ISYr53mAHhXu0KJvru7p1Ag==@protonmail.internalid>
2026-11-30 11:04 ` Peder Bergan via B4 Relay [this message]
2026-11-30 11:04 ` [PATCH RFC v2 1/2] block: rnull: stop zero-filling at the backing page boundary Peder Bergan via B4 Relay
2026-11-30 11:04 ` [PATCH RFC v2 2/2] block: rnull: track uncached discard coverage by sector Peder Bergan via B4 Relay
2026-11-30 12:19 ` [PATCH RFC v2 0/2] block: rnull: Fix hole reads and uncached discard coverage Andreas Hindborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130-fix-rnull-memory-backed-correctness-v2-0-250755ece813@gmail.com \
--to=devnull+peder.bergan.gmail.com@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=axboe@kernel.dk \
--cc=boqun@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peder.bergan@gmail.com \
--cc=rust-for-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®