libiscsi: log reason of error when readcapacity failed
authorKyle Zhang <kyle@smartx.com>
Fri, 12 Jul 2019 14:39:56 +0000 (22:39 +0800)
committerKyle Zhang <kyle@smartx.com>
Fri, 12 Jul 2019 14:39:56 +0000 (22:39 +0800)
Signed-off-by: Kyle Zhang <kyle@smartx.com>
engines/libiscsi.c

index e4eb0bab9297f6977b9e7b14b823aef3859e643f..bea94c5a14a8dc2a02fba672de4e3b81b0de932d 100644 (file)
@@ -117,7 +117,8 @@ static int fio_iscsi_setup_lun(struct iscsi_info *iscsi_info,
 
        task = iscsi_readcapacity16_sync(iscsi_lun->iscsi, iscsi_lun->url->lun);
        if (task == NULL || task->status != SCSI_STATUS_GOOD) {
-               log_err("iscsi: failed to send readcapacity command\n");
+               log_err("iscsi: failed to send readcapacity command: %s\n",
+                       iscsi_get_error(iscsi_lun->iscsi));
                ret = EINVAL;
                goto out;
        }