From owner-cvs-all@FreeBSD.ORG Mon Jun 18 06:06:40 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAD9716A421; Mon, 18 Jun 2007 06:06:40 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 41C2513C484; Mon, 18 Jun 2007 06:06:40 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.1/8.14.1) with ESMTP id l5I66cYB034077; Mon, 18 Jun 2007 10:06:38 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nagual.pp.ru; s=default; t=1182146798; bh=l/vE/Ar3z/1srWanICCBzp3HAvMgEgHRanvm9p7 Cq/Y=; l=1570; h=Received:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:User-Agent; b=BzOSgod7QQsmY1AKVrYO AxQCWUG9L9IN20LEDYSPm3BT/hnDo5uQPQdPmJYMfSiJP2fSL48oomaq5MzVxKxxKGN APaHbi158d1Y9s9e9gfwy1vYjKRreQzQ7xYaEvWMTSCKYrMESAa91iMR5Rj8gthDZ0z f2iv0q0A+oBHwfPhc= Received: (from ache@localhost) by nagual.pp.ru (8.14.1/8.14.1/Submit) id l5I66cUa034076; Mon, 18 Jun 2007 10:06:38 +0400 (MSD) (envelope-from ache) Date: Mon, 18 Jun 2007 10:06:37 +0400 From: Andrey Chernov To: Tim Kientzle Message-ID: <20070618060637.GA34022@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Tim Kientzle , Colin Percival , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org References: <200706180036.l5I0asac023540@repoman.freebsd.org> <4675DFC8.8060108@freebsd.org> <46760F7A.8020209@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46760F7A.8020209@freebsd.org> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Colin Percival Subject: Re: cvs commit: src/lib/libarchive archive_read_open_fd.c archive_read_open_filename.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2007 06:06:40 -0000 On Sun, Jun 17, 2007 at 09:52:10PM -0700, Tim Kientzle wrote: > Colin Percival wrote: > > Tim Kientzle wrote: > >> I fear I'll have to avoid seeks ... tape drives on > >> FreeBSD seem to return garbage from lseek(). > > Is there any reason why the tape drivers can't be fixed? > > Since people are running into this problem today > on 6.2, I'm planning to fix it where I can. :-/ > > The basic problem is that an lseek() call to a tape > drive returns success exactly as if it worked. > Daniel O'Connor recently sent me the following > ktrace from bsdtar doing a tar -t of an uncompressed > tar archive from his Tandberg TS400 connected to an > Adaptec 29160 controller: > > 5378 bsdtar CALL lseek(0x3,0,0,0x1) > 5378 bsdtar RET lseek 51200/0xc800 > 5378 bsdtar CALL lseek(0x3,0,0x2f800,0x1) > 5378 bsdtar RET lseek 245760/0x3c000 > > Note that the second call returns a new file position > that's exactly 0x2f800 bytes beyond the former file > position, even though nothing has actually happened. > > I think any of the following would be reasonable behaviors: > * lseek() could return ESPIPE ("illegal seek") > * lseek() could return an unchanged file offset > (indicating that the file position was unchanged by > the attempted seek). > * lseek() could return ENOTSUP ("unsupported operation") > As I said though, I just don't know that code well > enough to propose a fix. Then it should be fixed in the driver, please do not mask this bug in the bsdtar workaround. Ask adaptec driver people for help. -- http://ache.pp.ru/