]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r237452:
authorken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 29 Jun 2012 22:33:48 +0000 (22:33 +0000)
committerken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 29 Jun 2012 22:33:48 +0000 (22:33 +0000)
commit6cf2a8081b8a7c9ac12794c0947ec9eb6236a778
treedfc344445c47b34f728a3e473bcb6b23bec4a9e4
parent0110a7cc5ffad986c8ccf81d3a2c9b257cdabfcd
MFC r237452:

  r237452 | ken | 2012-06-22 12:57:06 -0600 (Fri, 22 Jun 2012) | 25 lines

  Change 'camcontrol defects' to first probe a drive to find out how much
  defect information it has before grabbing the full defect list.

  This works around a bug with some Hitachi drives that generate data overrun
  errors when they are asked for more defect data than they have.

  The change is done in a spec-compliant way, so it should have no negative
  impact on drives that don't have this issue.

  This is based on work originally done at Sandvine.

  scsi_da.h: Add a define for the maximum amount of data that can be
   contained in a defect list.

  camcontrol.c: Update the readdefects() function to issue an initial
   command to determine the length of the defect list, and
   then use that length in the request for the full defect
   list.

  camcontrol.8: Add a note that some drives will report 0 defects available
   if you don't request either the PLIST or GLIST.

  Submitted by: Mark Johnston <markjdb@gmail.com> (original version)

git-svn-id: svn://svn.freebsd.org/base/stable/9@237828 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/camcontrol/camcontrol.8
sbin/camcontrol/camcontrol.c
sys/cam/scsi/scsi_da.h