System: FreeBSD fearless2 10.0-RELEASE-p7 FreeBSD 10.0-RELEASE-p7 #0: Wed Jul 9 12:19:19 EDT 2014 root@fearless2:/usr/obj/usr/src/sys/CAMDEBUG amd64 On my SSDs (IBM TX21B10400GE8IBM) UNMAP should be used instead of ATA_TRIM as UNMAP seems much more reliable. Using TRIM, I get frequent timeouts: http://pastie.org/pastes/9368423/text?key=i4gmruxdtjars9fduq8w (da6:mps1:0:5:0): ATA COMMAND PASS THROUGH(16). CDB: 85 0d 06 00 01 00 03 00 00 00 00 00 00 40 06 00 (da6:mps1:0:5:0): CAM status: Command timeout (da6:mps1:0:5:0): Retrying command Is it possible to default to using UNMAP, if not for everything than for whitelisted devices?
delete method can now be selected by kern.cam.da.X.delete_method . Since this is old hardware, we are closing this as overcome by events instead of pretending that this is still being worked on. If it's still important to distinguish this on modern hardware, please file a new bug with a patch that creates a quirk to disable the use of ATA_TRIM (DA_Q_NO_UNMAP would disable ATA_TRIM too so we can't use that one).
All this story with using ATA_TRIM instead of UNMAP goes to very early days of the technology, when it was faster to bypass HBA firmware translation rather than use it. I have no idea whether it is still true. If it is not and somebody (tm) has enough data saying so, it would be nice to remove this hack to simplify the code.