Skip to content

Commit

Permalink
libublk: fix visibility
Browse files Browse the repository at this point in the history
1) remove pub for UblkQueueState

2) mark queue.process_ios() as pub(crate)

Signed-off-by: Ming Lei <[email protected]>
  • Loading branch information
ming1 committed Oct 8, 2023
1 parent de36c3f commit 9cbecaa
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl Drop for UblkDev {
}

#[derive(Debug, Clone, Default)]
pub struct UblkQueueState {
struct UblkQueueState {
cmd_inflight: u32,
state: u32,
}
Expand All @@ -285,12 +285,6 @@ impl UblkQueueState {
const UBLK_QUEUE_STOPPING: u32 = 1_u32 << 0;
const UBLK_QUEUE_IDLE: u32 = 1_u32 << 1;

pub fn new() -> Self {
Self {
..Default::default()
}
}

#[inline(always)]
fn queue_is_quiesced(&self) -> bool {
self.cmd_inflight == 0
Expand Down Expand Up @@ -845,7 +839,7 @@ impl UblkQueue<'_> {
/// provided, and target code can return UblkFatRes::BatchRes(batch) to
/// cover each completed IO(tag, result) in io closure. Then, all these
/// added IOs will be completed automatically.
pub fn process_ios<F>(&self, mut ops: F, to_wait: usize) -> Result<i32, UblkError>
pub(crate) fn process_ios<F>(&self, mut ops: F, to_wait: usize) -> Result<i32, UblkError>
where
F: FnMut(&UblkQueue, u16, &UblkIOCtx),
{
Expand Down

0 comments on commit 9cbecaa

Please sign in to comment.