[PATCH v2 02/83] rust: block: rename `SECTOR_MASK` to `PAGE_SECTOR_MASK`

From: Andreas Hindborg

Date: Tue Jun 09 2026 - 15:18:32 EST


The constant exposes `bindings::SECTOR_MASK`, which masks the sector
index within a page (`PAGE_SIZE / SECTOR_SIZE - 1`), not `SECTOR_SIZE`
itself as the original docstring suggested. The misleading name made
it easy for callers to reach for it when they wanted a byte-level
sector mask.

Rename the Rust constant to `PAGE_SECTOR_MASK` and fix the docstring.
The C binding is unchanged.

Signed-off-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>
---
rust/kernel/block.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/block.rs b/rust/kernel/block.rs
index 32c8d865afb6..b120e83d9425 100644
--- a/rust/kernel/block.rs
+++ b/rust/kernel/block.rs
@@ -4,8 +4,8 @@

pub mod mq;

-/// Bit mask for masking out [`SECTOR_SIZE`].
-pub const SECTOR_MASK: u32 = bindings::SECTOR_MASK;
+/// Bit mask for masking out the sector index in a page.
+pub const PAGE_SECTOR_MASK: u32 = bindings::SECTOR_MASK;

/// Sectors are size `1 << SECTOR_SHIFT`.
pub const SECTOR_SHIFT: u32 = bindings::SECTOR_SHIFT;

--
2.51.2