From owner-freebsd-scsi@FreeBSD.ORG Thu Jul 31 06:09:38 2014 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4810C99; Thu, 31 Jul 2014 06:09:38 +0000 (UTC) Received: from uriah.heep.sax.de (uriah.heep.sax.de [213.240.137.9]) by mx1.freebsd.org (Postfix) with ESMTP id 8FE122AB3; Thu, 31 Jul 2014 06:09:38 +0000 (UTC) Received: by uriah.heep.sax.de (Postfix, from userid 107) id 5D79E2612; Thu, 31 Jul 2014 08:09:36 +0200 (CEST) Date: Thu, 31 Jul 2014 08:09:36 +0200 From: Joerg Wunsch To: freebsd-scsi@freebsd.org Subject: Re: Bacula fails on FreeBSD 10.x / "mt fsf" infinitely proceeds Message-ID: <20140731060936.GB4095@uriah.heep.sax.de> Reply-To: Joerg Wunsch Mail-Followup-To: Joerg Wunsch , freebsd-scsi@freebsd.org, "Kenneth D. Merry" References: <20140729224414.E2AAE276@uriah.heep.sax.de> <20140730035230.GA81800@nargothrond.kdm.org> <20140730060330.GA3272@uriah.heep.sax.de> <20140730153229.GA86368@nargothrond.kdm.org> <20140730191915.9B944267B@uriah.heep.sax.de> <20140730203315.0EED1295B@uriah.heep.sax.de> <20140730204200.4645729B8@uriah.heep.sax.de> <53D95F61.4080701@FreeBSD.org> <20140730215113.GA3564@uriah.heep.sax.de> <20140731035756.GA91452@nargothrond.kdm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140731035756.GA91452@nargothrond.kdm.org> X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-GPG-Fingerprint: 5E84 F980 C3CA FD4B B584 1070 F48C A81B 69A8 5873 User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "Kenneth D. Merry" X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2014 06:09:38 -0000 As Kenneth D. Merry wrote: > > SA_CCB_BUFFER_WAITING was indeed not tested anywhere else, but there > > are decisions based on SA_CCB_BUFFER_IO (which used to be the opposite > > of SA_CCB_BUFFER_WAITING). These decisions now became random > > decisions. :-( > > Ahh, that explains it. That's also what I thought then ... in particular, it explains why I have seen one situation where the status has been reported correctly. > I think it would be good to keep the ability to report to the application > or the user what happened with control and data commands, especially since > you may wind up having errors on both types of commands in some cases. > (e.g. end of media notification on a write, and then perhaps an issue in > writing the filemarks.) OK, then it needs some more work. > > Unfortunately, the new Bugzilla doesn't seem to accept me (I tried > > Peter Wemm's description about kinit / kpasswd), so I cannot open > > a bug report for it. Meanwhile Eitan Adler helped me a bit, so the bug report is at: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192285 That way, it has been officially recorded, so we can take the time needed for a real fix. > > Attached is a suggested patch. So far, I only compile-tested it. > > As I said, I think it would be better to keep the ability to report both > control and I/O errors. If I have time tomorrow I'll try to come up with > something. (Or you can if you have the time.) There's no longer any hurry on it now. My patch^H^H^H^H^Hhack works, Bacula could successfully write to the tape automatically for the first time. I'll try looking into an improved version, but I wouldn't want to do too radical changes in order to not cause too much potential for conflict in your other pending patches. -- cheers, Joerg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)