From 0338063112032fbca272db209cfc7e5010fa74b7 Mon Sep 17 00:00:00 2001 From: Ming Lei Date: Mon, 18 Nov 2024 08:33:03 +0000 Subject: [PATCH] examples: handle FLUSH command 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 --- examples/ramdisk.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/ramdisk.rs b/examples/ramdisk.rs index 1b34cc6..679b45d 100644 --- a/examples/ramdisk.rs +++ b/examples/ramdisk.rs @@ -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; }