From owner-freebsd-arch@FreeBSD.ORG Sat Nov 12 00:18:49 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D70E2106564A; Sat, 12 Nov 2011 00:18:49 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 81BC18FC0A; Sat, 12 Nov 2011 00:18:49 +0000 (UTC) Received: by ggnk3 with SMTP id k3so6712992ggn.13 for ; Fri, 11 Nov 2011 16:18:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=VJ0du0gYY5FRWFakJTRj4hqa6E0uT0CcvxHEj9s5Mhg=; b=t3iqUyT9R0AGLHf5C75F5J4Rl71ofVfSujuOoIZVlZOgt7p8xwbgd1MaT0F9x7d1GY /stgUSK0LNB36u7RnrkAi1cuP2rO1Lf5w5T7uWMfjrD77Fy/HR8IwErMtlHuzA2e5qce Ki9AtCk3yOUC3iv/Zi217xQBJRvbOO8vxKY8U= MIME-Version: 1.0 Received: by 10.68.24.1 with SMTP id q1mr21695289pbf.29.1321057128463; Fri, 11 Nov 2011 16:18:48 -0800 (PST) Received: by 10.68.50.226 with HTTP; Fri, 11 Nov 2011 16:18:48 -0800 (PST) In-Reply-To: <4698F60B-CBF7-4D80-9368-CC6FBD893C0B@kientzle.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> <4698F60B-CBF7-4D80-9368-CC6FBD893C0B@kientzle.com> Date: Fri, 11 Nov 2011 16:18:48 -0800 Message-ID: From: Peter Wemm To: Tim Kientzle Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org, "arch@" 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: Sat, 12 Nov 2011 00:18:49 -0000 On Fri, Nov 11, 2011 at 4:08 PM, Tim Kientzle wrote: > On Nov 9, 2011, at 10:46 PM, 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? =A0That's one of the missing pieces. >> >> I thought that you couldn't seek(2) on tape drives. =A0You must read(2) = the data. =A0At least for this application, since a tar file would be just = one file on the tape. =A0If you want to see to the next file mark, you need= to use an ioctl to get there, or read a lot. > > Yes, seek(2) is badly broken on tape drives. =A0It does nothing and doesn= 't return an error (unlike seek(2) on pipes, which does return an error). > > I've seen references to ioctls that are supported by some drivers and/or = hardware that allow skipping forward by some number of records. =A0But I do= n't know the details. > > I doubt it's a major performance optimization in most cases, but it would= still be nice to avoid copying the data all the way down just to ignore it= . > > Tim Honestly, I think we've got bigger problems to worry about than whether lseek() works on magnetic tape drives in a form that tar/libarchive can use. --=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell