From owner-freebsd-scsi@FreeBSD.ORG Sun Aug 31 17:34:21 2003 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBF0C16A4BF for ; Sun, 31 Aug 2003 17:34:21 -0700 (PDT) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id C56C043FB1 for ; Sun, 31 Aug 2003 17:34:19 -0700 (PDT) (envelope-from dan@langille.org) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 32B943F4F; Sun, 31 Aug 2003 20:34:19 -0400 (EDT) From: "Dan Langille" To: Nate Lawson MIME-Version: 1.0 Message-ID: <3F525C19.20683.35EB4A01@localhost> Priority: normal References: <3F4CBD13.545.1FF6190E@localhost> In-reply-to: <20030827112748.Y31947@root.org> X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body cc: freebsd-scsi@freebsd.org cc: Kern Sibbald Subject: Re: (Fwd) Re: SCSI tape data loss X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Mon, 01 Sep 2003 00:34:21 -0000 X-Original-Date: Sun, 31 Aug 2003 20:35:37 -0400 X-List-Received-Date: Mon, 01 Sep 2003 00:34:21 -0000 On 27 Aug 2003 at 11:29, Nate Lawson wrote: > On Wed, 27 Aug 2003, Dan Langille wrote: > > On 27 Aug 2003 at 11:06, Nate Lawson wrote: > > > Here is a response I got by forwarding this to the pthreads maintainer: > > > > A return status of 0 from write is not interpreted as an End-Of-Tape. > > > > The threads library isn't smart enough to know that the file > > > > is a tape device and that a 0 status should break it out of the > > > > loop. Thus, it continues writing. > > > > > > > > Use libkse :-) > > > > > > > > -- > > > > Dan Eischen > > > > Nate: thanks for getting in touch with him. > > > > It is interesting to note that the code works OK on Linux and > > Solaris. Why is FreeBSD different in this case? > > I don't know. Our pthreads implementation is purely userland so it's > likely that it is difficult to differentiate a non-blocking read from an > EOF. > > > Kern: I can't comment on libkse. I don't know it and I don't know > > what effect it would have on Bacula. > > libkse is a drop-in replacement for libpthreads. Unfortunately, it's only > on 5.x. Kern's latest testing on my 5.1-RELEASE box has shown that problem problem persists. I think our next step is to try libkse. >From what I've been told, I just add: WITH_LIBMAP= yes to /etc/make.conf and rebuild rtld-elf (or world) in order to enable its use. Then make use of /etc/libmap.conf -- Dan Langille : http://www.langille.org/