AW: [Csync2] Can't stat file - csync2 stopped.

Martin Bene martin.bene at icomedias.com
Wed Jan 7 14:32:24 CET 2009


On Wed, Jan 07, 2009 Art -kwaak- van Breemen wrote:
> On Wed, Jan 07, 2009 at 11:40:24AM +0000, Prashant Ramhit wrote:
> > Size of final.mov = 3.2GB
> > Is there a file limitation for csync2?
>
> Well, it's long fixed in svn. The problem was a simple define to
> allow for 64 bit file sizes.
>
> Compile svn, or request your package maintainer to incorporate
> the patches in their stable build.
>
> If the 64 bit patch is already in that version, you might be
> working on a filesystem that does not support 64 bit filesizes.
> This applies f.i. to nfs version 2 (I just found out that
> nfs-kernel-server in debian refuses to use version3 if your
> /etc/hosts is somewhat different).

As far as I can tell, the fix is not in the generic sources but "tacked on" using packaging mechanisms (RPM specfile and debian rule). Installing from source tar.gz won't include the required define. Wouldn't a fix at the automake/autoconf level be more apropriate?

i.e: add
        AC_SYS_LARGEFILE
to configure.ac

While this works just fine for me it could fail for some weird cases where LARGEFILE support is broken - rsync autoconf uses a more complex setup to determine LARGEFILE support:

# arrgh. libc in some old debian version screwed up the largefile
# stuff, getting byte range locking wrong
AC_CACHE_CHECK([for broken largefile support],rsync_cv_HAVE_BROKEN_LARGEFILE,[
AC_TRY_RUN([
#define _FILE_OFFSET_BITS 64
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>

int main(void)
{
        struct flock lock;
        int status;
        char tpl[32] = "/tmp/locktest.XXXXXX";
        int fd = mkstemp(tpl);
        if (fd < 0) {
                strcpy(tpl, "conftest.dat");
                fd = open(tpl, O_CREAT|O_RDWR, 0600);
        }

        lock.l_type = F_WRLCK;
        lock.l_whence = SEEK_SET;
        lock.l_start = 0;
        lock.l_len = 1;
        lock.l_pid = 0;
        fcntl(fd,F_SETLK,&lock);
        if (fork() == 0) {
                lock.l_start = 1;
                _exit(fcntl(fd,F_SETLK,&lock) == 0);
        }
        wait(&status);
        unlink(tpl);
        exit(WEXITSTATUS(status));
}
],
rsync_cv_HAVE_BROKEN_LARGEFILE=yes,rsync_cv_HAVE_BROKEN_LARGEFILE=no,rsync_cv_HAVE_BROKEN_LARGEFILE=cross)])
if test x"$rsync_cv_HAVE_BROKEN_LARGEFILE" != x"yes"; then
   AC_SYS_LARGEFILE
fi

Bye, Martin


More information about the Csync2 mailing list