Date: Tue, 29 Jul 2014 21:18:29 +0200 From: Joerg Wunsch <freebsd-scsi@uriah.heep.sax.de> To: freebsd-scsi@freebsd.org Cc: "Kenneth D. Merry" <ken@freebsd.org> Subject: Re: Bacula fails on FreeBSD 10.x / "mt fsf" infinitely proceeds Message-ID: <20140729191829.GK3121@uriah.heep.sax.de> In-Reply-To: <201407291823.s6TINAad032318@higson.cam.lispworks.com> References: <20140729090724.GA26577@uriah.heep.sax.de> <201407291823.s6TINAad032318@higson.cam.lispworks.com>
next in thread | previous in thread | raw e-mail | index | archive | help
As Martin Simmons wrote:
> Maybe you are now connecting the tape drive via a different SCSI
> driver?
No, I forgot to say: the tape drive/library is a Sun L9 which has
HV-Diff-SCSI, so I have to use the exact same Symbios Logic SCSI
controller (and driver) as before.
> It sounds like you are running Bacula with "Fast Forward Space File
> = yes" in the configuration.
Yes, that's the case. However, even without that, I'm afraid the
Bacula logic would run into an infinite loop, as a single FSF
operation now always succeeds, and pretends it encountered a new tape
file. (Besides, the "Fast Forward Space File" thing did work for many
years.)
Looking into saspace() in sys/cam/scsi/scsi_sa.c, I see:
====================================================================
} else if (code == SS_FILEMARKS && softc->fileno != (daddr_t) -1) {
softc->fileno += (count - softc->last_ctl_resid);
if (softc->fileno < 0) /* we must of hit BOT */
softc->fileno = 0;
softc->blkno = 0;
====================================================================
That piece of code ought to be responsible when the SPACE command hit
a filemark. It hasn't been changed for more than a decade though.
Now the following SVN log message rang a bell to me:
====================================================================
r225950 | ken | 2011-10-03 22:32:55 +0200 (Mo, 03. Okt 2011) | 146 Zeilen
Add descriptor sense support to CAM, and honor sense residuals properly in
CAM.
====================================================================
It went in after my older (working) 8.2 system, it talks about
residual handling, and the code above uses "softc->last_ctl_resid".
It wouldn't surprise me if that's somehow related to the issue.
I'm Cc'ing Ken (as the committer of 225950) for an opinion, just in
case he doesn't follow the list so closely.
--
cheers, Joerg .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140729191829.GK3121>
