]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r313893
authorken <ken@FreeBSD.org>
Fri, 24 Feb 2017 20:47:56 +0000 (20:47 +0000)
committerken <ken@FreeBSD.org>
Fri, 24 Feb 2017 20:47:56 +0000 (20:47 +0000)
commit74a66f079644cde61566b4fd3178ea09231abe4a
tree3d24b3076fee92c29c6f22ad59556c7691e4e494
parent791af763b27e2747a033e3873999dfc3f0b18f73
MFC r313893

  ------------------------------------------------------------------------
  r313893 | ken | 2017-02-17 13:04:22 -0700 (Fri, 17 Feb 2017) | 48 lines

  Add task attribute support to camcontrol(8).

  Users can use the new generic argument, -Q task_attr, to specify a task
  attribute (simple, ordered, head of queue, aca) for the commands issued.
  The the default is simple, which works with all SCSI devices that support
  tagged queueing.

  This will mostly be useful for debugging target behavior in certain
  situations.

  You can try it out by compiling CTL with CTL_IO_DELAY turned on (in
  sys/cam/ctl/ctl_io.h) and then do something like this with one of the CTL
  LUNs:

  ctladm delay 0:0 -l done -t 10
  camcontrol tur da34 -v

  And at then before the 10 second timer is up, in another terminal:

  camcontrol inquiry da34 -Q ordered -v

  The Inquiry should complete just after the TUR completes.  Ordinarily
  it would complete first because of the delay injection, but because the
  task attribute is set to ordered in this case, CTL holds it up until the
  previous command has completed.

  sbin/camcontrol/camcontrol.c:
   Add the new generic argument, -Q, which allows the user to specify
   a SCSI task attribute.  The user can specify task attributes by
   name or numerically.

   Add a new task_attr arguments to SCSI sub-functions.

  sbin/camcontrol/attrib.c,
  sbin/camcontrol/camcontrol.h,
  sbin/camcontrol/fwdownload.c,
  sbin/camcontrol/modeedit.c,
  sbin/camcontrol/persist.c,
  sbin/camcontrol/timestamp.c,
  sbin/camcontrol/zone.c:
   Add the new task_attr argument to SCSI sub-functions.

  sbin/camcontrol/camcontrol.8:
   Document the new -Q option, and add an example.

  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
sbin/camcontrol/attrib.c
sbin/camcontrol/camcontrol.8
sbin/camcontrol/camcontrol.c
sbin/camcontrol/camcontrol.h
sbin/camcontrol/fwdownload.c
sbin/camcontrol/modeedit.c
sbin/camcontrol/persist.c
sbin/camcontrol/timestamp.c
sbin/camcontrol/zone.c