Linux block layer
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] block: rnull: Fix hole reads and discard coverage
@ 2026-11-30  9:31 Peder Bergan via B4 Relay
  2026-11-30  9:31 ` [PATCH RFC 1/2] block: rnull: stop zero-filling at the backing page boundary Peder Bergan via B4 Relay
  2026-11-30  9:31 ` [PATCH RFC 2/2] block: rnull: track uncached discard coverage by sector Peder Bergan via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Peder Bergan via B4 Relay @ 2026-11-30  9:31 UTC (permalink / raw)
  To: Andreas Hindborg, Jens Axboe
  Cc: Boqun Feng, linux-block, rust-for-linux, linux-kernel

This RFC is based on Andreas Hindborg's rnull-v7.4-rc2 feature
branch at 9c0fceca4feed. It targets the memory-backed driver
under development in that branch.

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. Correct the
sector stride in the cached discard path as well.

The x86-64 QEMU/KVM checks covered reads across backing-page
boundaries, partial discards across adjacent pages, and reclamation
after discards. The checks included changes between 512-byte and
4 KiB logical blocks in both directions and a cached discard with
an unchanged block size.

---
OpenAI Codex assisted with coding and testing.

---
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      | 36 +++++++++++++++++++++--------
 drivers/block/rnull/disk_storage/page.rs | 16 +++++++++++++
 drivers/block/rnull/rnull.rs             | 39 ++++++++++++++++++--------------
 drivers/block/rnull/util.rs              |  7 ------
 4 files changed, 64 insertions(+), 34 deletions(-)
---
base-commit: 9c0fceca4feed5f1056f55abe9c7c70731402776
change-id: 20261130-fix-rnull-memory-backed-correctness-a7d95f64ab7e

Best regards,
--  
Peder Bergan <peder.bergan@gmail.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-30 12:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30  9:31 [PATCH RFC 0/2] block: rnull: Fix hole reads and discard coverage Peder Bergan via B4 Relay
2026-11-30  9:31 ` [PATCH RFC 1/2] block: rnull: stop zero-filling at the backing page boundary Peder Bergan via B4 Relay
2026-11-30 11:22   ` Andreas Hindborg
2026-11-30  9:31 ` [PATCH RFC 2/2] block: rnull: track uncached discard coverage by sector Peder Bergan via B4 Relay
2026-11-30 12:15   ` Andreas Hindborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox