From owner-freebsd-arch@FreeBSD.ORG Thu Nov 10 16:29:16 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9044D106567B for ; Thu, 10 Nov 2011 16:29:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 430F18FC1B for ; Thu, 10 Nov 2011 16:29:16 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pAAGKXr7021471 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 10 Nov 2011 09:20:34 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4ebbf731.37OBtp+PJFFB1Hsl%perryh@pluto.rain.com> Date: Thu, 10 Nov 2011 09:19:39 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <00E98C7D-8683-4318-AFCA-5782EB17EE0E@bsdimp.com> References: <201110281426.00013.jhb@freebsd.org> <4EB2C9DD.9090606@FreeBSD.org> <20111104160319.GD6110@elvis.mu.org> <201111080800.32717.jhb@freebsd.org> <6E287E90-AA62-4776-A09D-394D69C9494F@kientzle.com> <1B4CA8AC-8798-40CD-9379-FA0F379558DE@bsdimp.com> <4ebbf731.37OBtp+PJFFB1Hsl%perryh@pluto.rain.com> To: perryh@pluto.rain.com X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Thu, 10 Nov 2011 09:20:35 -0700 (MST) Cc: bruce@cran.org.uk, ed@80386.nl, jilles@stack.nl, tim@kientzle.com, alfred@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 16:29:16 -0000 On Nov 10, 2011, at 9:09 AM, perryh@pluto.rain.com wrote: > Warner Losh wrote: >> On Nov 9, 2011, at 11:03 PM, Tim Kientzle wrote: >>> Anyone know how to properly request a "skip forward" >>> on tape drives? That's one of the missing pieces. >>=20 >> I thought that you couldn't seek(2) on tape drives. You must >> read(2) the data. At least for this application, since a tar file >> would be just one file on the tape. If you want to see to the >> next file mark, you need to use an ioctl to get there, or read a >> lot. >=20 > AFAIK you can't seek(2) backward unless using something along the > lines of a DECtape (remember those?), but there's no reason in > principle why a forward seek(2) could not be implemented in the > driver -- even without any help from the hardware. It would save > some DMA, interrupt, and context-switch traffic, but even when > searching for a filemark the drive won't move the tape any faster > than when reading. Seek(2) never makes it down to the driver for character devices. = Character devices have no position. VMS did implement forward and reverse seeking on at least mag tapes. Warner