Skip to content

Commit

Permalink
libublk: document UblkIORes and UblkFatRes
Browse files Browse the repository at this point in the history
Both are public structure for target code, so document them

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
  • Loading branch information
ming1 committed Oct 8, 2023
1 parent 9cbecaa commit 97eaf9b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,30 @@ pub const UBLK_DEV_F_RECOVER_DEV: u32 = 1u32 << 2;

const UBLK_DEV_F_ALL: u32 = UBLK_DEV_F_COMP_BATCH | UBLK_DEV_F_ADD_DEV | UBLK_DEV_F_RECOVER_DEV;

/// Ublk Fat completion result
pub enum UblkFatRes {
/// Batch completion
///
/// Vector is returned, and each element(`tag`, `result`) describes one
/// io command completion result.
BatchRes(Vec<(u16, i32)>),

/// Zoned Append completion result
///
/// (`result`, `returned lba`) is included in this result.
ZonedAppendRes((i32, u64)),
}

/// Ublk IO completion result
///
/// Ok() part of io command completion result `Result<UblkIORes, UblkError>`
pub enum UblkIORes {
/// normal result
///
/// Completion result of this io command
Result(i32),

/// Fat completion result
#[cfg(feature = "fat_complete")]
FatRes(UblkFatRes),
}
Expand Down

0 comments on commit 97eaf9b

Please sign in to comment.