When performing an "mt fsf 32767", the expectation is the driver moves the tape to EOD, and then "mt status" reports the number of tape files (filemarks) that have been encountered before reaching EOD. However, it (usually) reports 32767 instead. The bug was triggered by SVN r256843 (on HEAD, merged to 10-stable in r260387). See the discussion starting at: http://docs.freebsd.org/cgi/mid.cgi?20140729090724.GA26577 for details.
A commit references this bug: Author: joerg Date: Thu Jul 31 22:09:50 UTC 2014 New revision: 269353 URL: http://svnweb.freebsd.org/changeset/base/269353 Log: Fix breakage introduced by r256843: removing the SA_CCB_WAITING bit left some of the decisions based on its counterpart, SA_CCB_BUFFER_IO being random. As a result, propagation of the residual information for the SPACE command was broken, so the number of filemarks encountered during a SPACE operation was miscalculated. Consequently, systems relying on properly tracked filemark counters (like Bacula) fell apart. The change also removes a switch/case in sadone() which r256843 degraded to a single remaining case label. PR: 192285 Approved by: ken MFC after: 2 weeks Changes: head/sys/cam/scsi/scsi_sa.c
A commit references this bug: Author: joerg Date: Fri Aug 8 14:42:04 UTC 2014 New revision: 269717 URL: http://svnweb.freebsd.org/changeset/base/269717 Log: Merge r269353: Fix breakage introduced by r256843: removing the SA_CCB_WAITING bit left some of the decisions based on its counterpart, SA_CCB_BUFFER_IO being random. As a result, propagation of the residual information for the SPACE command was broken, so the number of filemarks encountered during a SPACE operation was miscalculated. Consequently, systems relying on properly tracked filemark counters (like Bacula) fell apart. The change also removes a switch/case in sadone() which r256843 degraded to a single remaining case label. PR: 192285 Changes: _U stable/10/ stable/10/sys/cam/scsi/scsi_sa.c
Fixed in both, head and stable/10. Not affecting older stable branches.