Subject: Re: hexdumping large sparce files
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 01/24/2003 18:33:01
> Is there anything in the kernel that could be used to speed up the
> dumping of very large, very sparce files?

> For instance I would like to be able to verify the non-zero parts of
> the following file:

> $ ls -ls z
> 192 -rwxr-xr-x  1 dsl  wheel  14797279232 Jan 24 22:31 z

> without actually transferring 14Gb of data from kernel to user.
> (and maybe without filling all of physical memory with 0 bytes).

Well, it's only a little like what I assume you're looking for, but if
the file is on an FFS filesystem, I have code that knows how to read
the disk directly and detect holes in the file that way.

Drop me a line if you're interested in discussing it further.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B