1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

Report STATUS_QUEUED/SENT in ctladm dumpooa output.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
This commit is contained in:
Alexander Motin 2020-05-29 13:07:52 +00:00
parent e43ae8dcb5
commit dbcf7598b0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361625
3 changed files with 15 additions and 4 deletions

View File

@ -2433,6 +2433,12 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num,
if (io->io_hdr.flags & CTL_FLAG_DMA_QUEUED)
entry->cmd_flags |= CTL_OOACMD_FLAG_DMA_QUEUED;
if (io->io_hdr.flags & CTL_FLAG_STATUS_QUEUED)
entry->cmd_flags |= CTL_OOACMD_FLAG_STATUS_QUEUED;
if (io->io_hdr.flags & CTL_FLAG_STATUS_SENT)
entry->cmd_flags |= CTL_OOACMD_FLAG_STATUS_SENT;
}
mtx_unlock(&lun->lun_lock);
}

View File

@ -247,7 +247,9 @@ typedef enum {
CTL_OOACMD_FLAG_BLOCKED = 0x02,
CTL_OOACMD_FLAG_ABORT = 0x04,
CTL_OOACMD_FLAG_RTR = 0x08,
CTL_OOACMD_FLAG_DMA_QUEUED = 0x10
CTL_OOACMD_FLAG_DMA_QUEUED = 0x10,
CTL_OOACMD_FLAG_STATUS_QUEUED = 0x20,
CTL_OOACMD_FLAG_STATUS_SENT = 0x40
} ctl_ooa_cmd_flags;
struct ctl_ooa_entry {

View File

@ -336,17 +336,20 @@ cctl_dump_ooa(int fd, int argc, char **argv)
if (ts.tv_nsec > 0)
cmd_latency += ts.tv_nsec / 1000000;
fprintf(stdout, "LUN %jd tag 0x%04x%s%s%s%s%s: %s. CDB: %s "
fprintf(stdout, "LUN %jd tag 0x%04x%s%s%s%s%s%s%s: %s. CDB: %s "
"(%0.0Lf ms)\n",
(intmax_t)entry->lun_num, entry->tag_num,
(entry->cmd_flags & CTL_OOACMD_FLAG_BLOCKED) ?
" BLOCKED" : "",
(entry->cmd_flags & CTL_OOACMD_FLAG_DMA) ? " DMA" : "",
(entry->cmd_flags & CTL_OOACMD_FLAG_RTR) ? " RTR" :"",
(entry->cmd_flags & CTL_OOACMD_FLAG_DMA_QUEUED) ?
" DMAQUEUED" : "",
(entry->cmd_flags & CTL_OOACMD_FLAG_DMA) ? " DMA" : "",
(entry->cmd_flags & CTL_OOACMD_FLAG_STATUS_QUEUED) ?
" STATUSQUEUED" : "",
(entry->cmd_flags & CTL_OOACMD_FLAG_STATUS_SENT) ? " STATUS" : "",
(entry->cmd_flags & CTL_OOACMD_FLAG_ABORT) ?
" ABORT" : "",
(entry->cmd_flags & CTL_OOACMD_FLAG_RTR) ? " RTR" :"",
scsi_op_desc(entry->cdb[0], NULL),
scsi_cdb_string(entry->cdb, cdb_str, sizeof(cdb_str)),
cmd_latency);