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:
parent
e43ae8dcb5
commit
dbcf7598b0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361625
@ -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);
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user