Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/rust/kernel/block.rs
29266 views
1
// SPDX-License-Identifier: GPL-2.0
2
3
//! Types for working with the block layer.
4
5
pub mod mq;
6
7
/// Bit mask for masking out [`SECTOR_SIZE`].
8
pub const SECTOR_MASK: u32 = bindings::SECTOR_MASK;
9
10
/// Sectors are size `1 << SECTOR_SHIFT`.
11
pub const SECTOR_SHIFT: u32 = bindings::SECTOR_SHIFT;
12
13
/// Size of a sector.
14
pub const SECTOR_SIZE: u32 = bindings::SECTOR_SIZE;
15
16
/// The difference between the size of a page and the size of a sector,
17
/// expressed as a power of two.
18
pub const PAGE_SECTORS_SHIFT: u32 = bindings::PAGE_SECTORS_SHIFT;
19
20