|
I work on a backup product and I'm trying to add code to be able to read
large sparse files in a reasonable amount of time. If I create a 10TB
sparse file, it takes about 3 days to read it. On IRIX 6.2, there is a
fcntl call that we use to read the file's block map (F_GETBMAP). Is there
any function in Digital UNIX that is equivalent?
I talked with Miller about how we would read large sparse files and he
asked for the IRIX 6.2 fcntl man page below:
FCNTL(2) FCNTL(2)
NAME
fcntl - file and descriptor control
C SYNOPSIS
#include <unistd.h>
#include <fcntl.h>
int fcntl (int fildes, int cmd, ... /* arg */);
DESCRIPTION
fcntl provides for control over open descriptors. fildes is an open
descriptor obtained from a creat, open, dup, fcntl, pipe, socket, or
F_GETBMAP Get the block map for a segment of a file in an XFS file
system. The arg points to an arry of variables of type struct
getbmap. All sizes and offsets in the structure are in units
of 512 bytes. The structure fields include: bmv_offset (file
offset of segment), bmv_block (starting block of segment),
bmv_length (length of segment), bmv_count (number of array
entries, including the first), and bmv_entries (number of
entries filled in). The first structure in the array is a
header, and the remaining structures in the array contain block
map information on return. The header controls iterative calls
to the F_GETBMAP command. The caller fills in the bmv_offset
and bmv_length fields of the header to indicate the area of
interest in the file, and fills in the bmv_count field to
indicate the length of the array. If the bmv_length value is
set to -1 then the length of the interesting area is the rest
of the file. On return from a call, the header is updated so
that the command can be used again to obtain more information,
without re-initializing the structures. Also on return, the
bmv_entries field of the header is set to the number of array
entries actually filled in. The non-header structures will be
filled in with bmv_offset, bmv_block, and bmv_length. If a
region of the file has no blocks (is a hole in the file) then
the bmv_block field is set to -1.
F_GETBMAPA
Identical to F_GETBMAP except that information about the
attribute fork of the file is returned.
|
|
RE: -1
According to the Digital UNIX group, there is no sparse file read in UFS.
There are Advfs APIs for what this ISV want, but it will not be available
until Steel timeframe. I need to check with decwet::marier (Shawn
Marier) for more details.
The short answer is: Sparse file read is not available on Digital UNIX
anytime soon.
Note closed.
Miller
|