Skip to content

Commit

Permalink
examples: handle FLUSH command
Browse files Browse the repository at this point in the history
When default cache type becomes 'write back', FLUSH command can't be
failed.

Fix recent regression.

Fixes: ed74ba0 ("libublk: set default cache type as 'write back'")
Signed-off-by: Ming Lei <[email protected]>
  • Loading branch information
ming1 committed Nov 18, 2024
1 parent adab675 commit 0338063
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/ramdisk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fn handle_io(q: &UblkQueue, tag: u16, buf_addr: *mut u8, start: *mut u8) -> i32
bytes as usize,
);
},
libublk::sys::UBLK_IO_OP_FLUSH => {}
_ => {
return -libc::EINVAL;
}
Expand Down

0 comments on commit 0338063

Please sign in to comment.