Re: "tar tfv /dev/cd0" speedup patch; Linux compatibility patches

2010-02-23 Thread Juergen Lock
On Mon, Feb 22, 2010 at 08:47:57PM -0800, Tim Kientzle wrote: > Juergen Lock wrote: > > On Sun, Feb 21, 2010 at 05:17:37PM -0800, Tim Kientzle wrote: > >> > >> Could you try the current version of read_open_filename from: > >> > >> http://libarchive.googlecode.com/svn/trunk/libarchive/archive_read_

Re: "tar tfv /dev/cd0" speedup patch; Linux compatibility patches

2010-02-22 Thread Tim Kientzle
Juergen Lock wrote: On Sun, Feb 21, 2010 at 05:17:37PM -0800, Tim Kientzle wrote: Could you try the current version of read_open_filename from: http://libarchive.googlecode.com/svn/trunk/libarchive/archive_read_open_filename.c Small but important bug: Index: archive_read_open_filename.c @@

Re: "tar tfv /dev/cd0" speedup patch; Linux compatibility patches

2010-02-22 Thread Juergen Lock
On Sun, Feb 21, 2010 at 05:17:37PM -0800, Tim Kientzle wrote: > Juergen, > > Could you try the current version of read_open_filename from: > > http://libarchive.googlecode.com/svn/trunk/libarchive/archive_read_open_filename.c > > You should be able to just copy it into your FreeBSD source > tree

Re: "tar tfv /dev/cd0" speedup patch

2010-02-21 Thread Tim Kientzle
Juergen, Could you try the current version of read_open_filename from: http://libarchive.googlecode.com/svn/trunk/libarchive/archive_read_open_filename.c You should be able to just copy it into your FreeBSD source tree and recompile. Duane Hesser's comments clarified for me that disk and tape

Re: "tar tfv /dev/cd0" speedup patch

2010-02-20 Thread Tim Kientzle
Duane H. Hesser wrote: I have a couple of suggestions which may help you with what you are trying to do. First, though, I can confirm that Unix character special tape drivers since at least V7 have always ignored seeks. They happily return the requested offset without feeling the need to actua

Re: "tar tfv /dev/cd0" speedup patch

2010-02-20 Thread Duane H. Hesser
Tim and Juergen I have a couple of suggestions which may help you with what you are trying to do. First, though, I can confirm that Unix character special tape drivers since at least V7 have always ignored seeks. They happily return the requested offset without feeling the need to actually *do*

Re: "tar tfv /dev/cd0" speedup patch

2010-02-20 Thread Juergen Lock
On Sat, Feb 20, 2010 at 01:00:40AM -0500, Jung-uk Kim wrote: > On Saturday 20 February 2010 12:20 am, Tim Kientzle wrote: > > Juergen, > > > > I was looking at your Linux code here and thought > > the technique of trying lseek(SEEK_END) might work. > > Unfortunately, it doesn't: lseek(fd, 0, SEEK_E

Re: "tar tfv /dev/cd0" speedup patch

2010-02-20 Thread Juergen Lock
On Fri, Feb 19, 2010 at 09:20:30PM -0800, Tim Kientzle wrote: > Juergen, Hi! > > I was looking at your Linux code here and thought > the technique of trying lseek(SEEK_END) might work. > Unfortunately, it doesn't: lseek(fd, 0, SEEK_END) gives > zero for both /dev/sa0 (a tape drive) and /dev/cd0 >

Re: "tar tfv /dev/cd0" speedup patch

2010-02-19 Thread Tim Kientzle
I should have been clearer; I tried this techniqe on FreeBSD; I've not tried it on Linux yet. (I don't have a Linux machine with a tape drive at the moment.) It doesn't work on FreeBSD; I was questioning whether anyone else had tested it on Linux. If Juergen's technique doesn't work, I'll try th

Re: "tar tfv /dev/cd0" speedup patch

2010-02-19 Thread Jung-uk Kim
On Saturday 20 February 2010 12:20 am, Tim Kientzle wrote: > Juergen, > > I was looking at your Linux code here and thought > the technique of trying lseek(SEEK_END) might work. > Unfortunately, it doesn't: lseek(fd, 0, SEEK_END) gives > zero for both /dev/sa0 (a tape drive) and /dev/cd0 > (an opti

Re: "tar tfv /dev/cd0" speedup patch

2010-02-19 Thread Tim Kientzle
Juergen, I was looking at your Linux code here and thought the technique of trying lseek(SEEK_END) might work. Unfortunately, it doesn't: lseek(fd, 0, SEEK_END) gives zero for both /dev/sa0 (a tape drive) and /dev/cd0 (an optical drive). Are you sure it works on Linux? Tim P.S. Here's the pro

Re: "tar tfv /dev/cd0" speedup patch

2010-02-19 Thread Joerg Sonnenberger
On Thu, Feb 18, 2010 at 09:03:33PM -0800, Tim Kientzle wrote: > Joerg Sonnenberger wrote: > >On Thu, Feb 18, 2010 at 07:34:59PM +0100, Juergen Lock wrote: > >> Ok here is a new version of the patch with these things fixed and the > >>Linux case added: (Linux case not tested yet, and yes I did this

Re: "tar tfv /dev/cd0" speedup patch

2010-02-19 Thread Juergen Lock
On Thu, Feb 18, 2010 at 10:12:24PM -0800, Garrett Cooper wrote: > On Thu, Feb 18, 2010 at 10:34 AM, Juergen Lock > wrote: > > On Wed, Feb 17, 2010 at 10:38:30PM -0800, Tim Kientzle wrote: > >> Juergen Lock wrote: > >> > > >> >  ...  since bsdtar/libarchive know iso9660 I just did the command in t

seeking and seekability (was: "tar tfv /dev/cd0" speedup patch)

2010-02-19 Thread Matthias Andree
Am 19.02.2010, 06:03 Uhr, schrieb Tim Kientzle : Joerg Sonnenberger wrote: On Thu, Feb 18, 2010 at 07:34:59PM +0100, Juergen Lock wrote: Ok here is a new version of the patch with these things fixed and the Linux case added: (Linux case not tested yet, and yes I did this on stable/8.) Why t

Re: "tar tfv /dev/cd0" speedup patch

2010-02-18 Thread Garrett Cooper
On Thu, Feb 18, 2010 at 10:34 AM, Juergen Lock wrote: > On Wed, Feb 17, 2010 at 10:38:30PM -0800, Tim Kientzle wrote: >> Juergen Lock wrote: >> > >> >  ...  since bsdtar/libarchive know iso9660 I just did the command in the >> > Subject.  It worked, but it was sloow... :(  Apparently it read all o

Re: "tar tfv /dev/cd0" speedup patch

2010-02-18 Thread Tim Kientzle
Joerg Sonnenberger wrote: On Thu, Feb 18, 2010 at 07:34:59PM +0100, Juergen Lock wrote: Ok here is a new version of the patch with these things fixed and the Linux case added: (Linux case not tested yet, and yes I did this on stable/8.) Why the check at all? Shouldn't devices that don't allo

Re: "tar tfv /dev/cd0" speedup patch

2010-02-18 Thread Juergen Lock
On Thu, Feb 18, 2010 at 07:34:59PM +0100, Juergen Lock wrote: > On Wed, Feb 17, 2010 at 10:38:30PM -0800, Tim Kientzle wrote: > > Juergen Lock wrote: > > > > > > ... since bsdtar/libarchive know iso9660 I just did the command in the > > > Subject. It worked, but it was sloow... :( Apparently i

Re: "tar tfv /dev/cd0" speedup patch

2010-02-18 Thread Joerg Sonnenberger
On Thu, Feb 18, 2010 at 07:34:59PM +0100, Juergen Lock wrote: > Ok here is a new version of the patch with these things fixed and the > Linux case added: (Linux case not tested yet, and yes I did this on > stable/8.) Why the check at all? Shouldn't devices that don't allow seek fail that? E.g. f

Re: "tar tfv /dev/cd0" speedup patch

2010-02-18 Thread Juergen Lock
On Wed, Feb 17, 2010 at 10:38:30PM -0800, Tim Kientzle wrote: > Juergen Lock wrote: > > > > ... since bsdtar/libarchive know iso9660 I just did the command in the > > Subject. It worked, but it was sloow... :( Apparently it read all of > > the disc without seeking. The following patch fixes t

Re: "tar tfv /dev/cd0" speedup patch

2010-02-17 Thread Tim Kientzle
Juergen Lock wrote: ... since bsdtar/libarchive know iso9660 I just did the command in the Subject. It worked, but it was sloow... :( Apparently it read all of the disc without seeking. The following patch fixes this, is something like this desired? If yes I could look how to do the same f

"tar tfv /dev/cd0" speedup patch

2010-02-17 Thread Juergen Lock
Hi! I recently wanted to quickly look at an optical disc without mounting it and since bsdtar/libarchive know iso9660 I just did the command in the Subject. It worked, but it was sloow... :( Apparently it read all of the disc without seeking. The following patch fixes this, is something like t