Add more context to the error messages
Errors like:
fio: pid=0, err=22/file:filesetup.c:380, error=Invalid argument
do not give a lot of clue as to what is wrong, unless you
have a matching source. So add a context relevant info
message as well.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/io_u.c b/io_u.c
index c938960..8141991 100644
--- a/io_u.c
+++ b/io_u.c
@@ -548,7 +548,7 @@
if (min_events > 0) {
ret = td_io_commit(td);
if (ret < 0) {
- td_verror(td, -ret);
+ td_verror(td, -ret, "td_io_commit");
return ret;
}
} else {
@@ -559,7 +559,7 @@
ret = td_io_getevents(td, min_events, td->cur_depth, tvp);
if (ret < 0) {
- td_verror(td, -ret);
+ td_verror(td, -ret, "td_io_getevents");
return ret;
} else if (!ret)
return ret;