From 314f912f689c91b3adb16cbe8faa43093b344dba Mon Sep 17 00:00:00 2001 From: Joursoir Date: Mon, 16 Jan 2023 03:46:40 +0400 Subject: add stub-handling for unsucceseed I/O --- sbdd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sbdd.c b/sbdd.c index 86ec402..f412ff2 100644 --- a/sbdd.c +++ b/sbdd.c @@ -59,6 +59,11 @@ static void io_end_bio(struct bio *bio) pr_debug("I/O operation is completed\n"); + if (bio->bi_status != BLK_STS_OK) { + pr_err("oops, error during I/O operation..."); + /* TODO: handle errors */ + } + io_bio->original_bio->bi_status = bio->bi_status; bio_put(bio); -- cgit v1.2.3-18-g5258