From 9cbecaa482f2c0e9dfb17e525281e903a6374d78 Mon Sep 17 00:00:00 2001 From: Ming Lei Date: Sun, 8 Oct 2023 12:20:56 +0000 Subject: [PATCH] libublk: fix visibility 1) remove pub for UblkQueueState 2) mark queue.process_ios() as pub(crate) Signed-off-by: Ming Lei --- src/io.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/io.rs b/src/io.rs index e1955ea..da5357e 100644 --- a/src/io.rs +++ b/src/io.rs @@ -276,7 +276,7 @@ impl Drop for UblkDev { } #[derive(Debug, Clone, Default)] -pub struct UblkQueueState { +struct UblkQueueState { cmd_inflight: u32, state: u32, } @@ -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 @@ -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(&self, mut ops: F, to_wait: usize) -> Result + pub(crate) fn process_ios(&self, mut ops: F, to_wait: usize) -> Result where F: FnMut(&UblkQueue, u16, &UblkIOCtx), {