Coda File System

Re: problems with truncated backups

From: Jan Harkes <>
Date: Wed, 21 May 2003 14:20:40 -0400
On Wed, May 21, 2003 at 12:59:11PM -0400, Jan Harkes wrote:
> So something must have broken in librpc2 where it doesn't seek to the
> right offset before writing the next batch of data to the dumpfile.

Found it, an lseek is missing when we open a file by name.

I also noticed another problem. RPC2 isn't large-file compliant at all
and interprets a negative 32-bit number as a request to truncate the
file. So files and dumps larger than 2GB will not work correctly, sigh.

I did a quick check of all code that uses FILEBYNAME transfers and
luckily, the missing lseek only affects backups that are dumped with the
backup program.

The 2GB limit probably has an effect in more places. It should not be
too hard to fix this for places that transfer a complete file in a
single sftp operation (i.e. SeekOffset <= 0), which is almost
everywhere. The code that uses a specific SeekOffset can then be
converted to either use FILEBYFD and perform the own seek before passing
the fd down to rpc2, or we have to break the ABI format of the sftp
descriptor to allow for 64-bit offsets.

Received on 2003-05-21 14:22:26