From owner-freebsd-arch@FreeBSD.ORG Thu Nov 10 09:22:23 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 78A9A106566C for ; Thu, 10 Nov 2011 09:22:23 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 3FDE08FC13 for ; Thu, 10 Nov 2011 09:22:23 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id pAA9BKbA045756 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 10 Nov 2011 01:11:20 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id pAA9BJtl045755; Thu, 10 Nov 2011 01:11:20 -0800 (PST) Received: from fbsd81 ([192.168.200.81]) by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA12600; Thu, 10 Nov 11 01:09:29 PST Date: Thu, 10 Nov 2011 08:09:21 -0800 From: perryh@pluto.rain.com To: imp@bsdimp.com Message-Id: <4ebbf731.37OBtp+PJFFB1Hsl%perryh@pluto.rain.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> In-Reply-To: <1B4CA8AC-8798-40CD-9379-FA0F379558DE@bsdimp.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 09:22:23 -0000 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. > > 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. 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.