Skip to content
  • Alexander Motin's avatar
    cam: Optimize write protection MODE SENSE in da(4). · a9a2cdaf
    Alexander Motin authored
    Before this change on every open da(4) driver read all mode pages to
    use only one bit.  It was done so to not depend on the list of pages
    supported by the disk.  But I've found that at least for SATL of LSI/
    Broadcom HBAs with WD HDDs Power Condition mode page reading may take
    significant amount of time, much more than any other mode page, that
    visibly increased disk retaste time by GEOM.
    
    Address that by using data returned by the first MODE SENSE request
    to limit the following ones to only one (the first for now) mode page.
    
    With the change simultaneous retaste of 39 SATA disks takes about 2.5s
    instead of more than 4s before, and I no longer see "dareprobe" status
    on GEOM event thread.
    
    MFC after:	2 weeks
    Sponsored by:	iXsystems, Inc.
    a9a2cdaf