Date: Sat, 20 Feb 2010 21:23:37 -0800 From: Tim Kientzle <kientzle@freebsd.org> To: Duane.Hesser@gmail.com Cc: freebsd-hackers@freebsd.org Subject: Re: "tar tfv /dev/cd0" speedup patch Message-ID: <4B80C359.6070707@freebsd.org> In-Reply-To: <201002210046.o1L0kmDt026041@belinda.androcles.org> References: <20100217215940.GA19713@triton8.kn-bremen.de> <20100219181247.GA35702@triton8.kn-bremen.de> <4B7F711E.6040402@freebsd.org> <201002200100.48161.jkim@FreeBSD.org> <201002210046.o1L0kmDt026041@belinda.androcles.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 actually > *do* anything. The FreeBSD scsi_sa driver continues this tradition. Duane, Thank you very, very much for taking the time to write up this information. I'm going to definitely archive your message for future reference. To clarify "what we are trying to do": For some time now, libarchive format handlers have issued "skip" requests internally for things like skipping unnecessary file bodies. Depending on the device you're talking to, these internal skip requests can be translated into seek operations or can be handled by reading and discarding data. As Juergen found when he tried to do "tar tf /dev/cd0", my earlier code was pretty conservative: It only translated skip requests into lseek() operations for regular files. Juergen took a stab at improving that so that operations on raw disk devices would use lseek(). With your information, it should be pretty easy to translate skip requests into mtio operations on tape drives. Libarchive's core already supports rounding skip operations to multiples of the block size, so this should be an easy addition. As it happens, I'm just starting this week to look into multi-volume support for libarchive. I'm hoping to get that into good shape this year. Your notes on size estimation will be quite helpful once I get further into that. Thanks again, and I may be in touch over the next few months with more questions.... ;-) Tim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B80C359.6070707>