crtimes discrepancy on PPC - Tools

This is a discussion on crtimes discrepancy on PPC - Tools ; On a PPC machine running Mac OS X, I noticed that creation time is not preserved for files that are transferred (i.e. versus files that are not transferred, or files that have only attribute changes). I discovered two things that ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: crtimes discrepancy on PPC

  1. crtimes discrepancy on PPC

    On a PPC machine running Mac OS X, I noticed that creation time is not
    preserved for files that are transferred (i.e. versus files that are
    not transferred, or files that have only attribute changes). I
    discovered two things that work together to cause this:

    1) cmp_time (util.c) doesn't check for negative values provided in
    file1 or file2. If file2 is positive, and file1 is negative, and
    absolute_value(file1) > file2, cmp_time returns 0, even though the
    times are obviously different. Of course, a file's crtime should
    never be negative, which leads me to #2.

    2) set_file_attrs (rsync.c) doesn't initialize sx2.crtime (e.g. when
    the sxp argument is NULL). This leads to crtime values that are
    occasionally > 2^31, resulting in negative crtimes.

    The attached patch resolves these.

    Mike




    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

  2. Re: crtimes discrepancy on PPC

    On Mon, Sep 29, 2008 at 09:49:26AM -0500, Mike Bombich wrote:
    > 1) cmp_time (util.c) doesn't check for negative values provided in file1 or
    > file2. If file2 is positive, and file1 is negative, and
    > absolute_value(file1) > file2, cmp_time returns 0, even though the times
    > are obviously different.


    Yeah, that's a subtle one. I've changed it in a little simpler way:
    reordering the args in the ifs so that an underflow can't trigger a
    spurious successful test. Patch attached.

    > 2) set_file_attrs (rsync.c) doesn't initialize sx2.crtime (e.g. when the
    > sxp argument is NULL).


    Thanks! I've applied that change to the crtimes diff.

    ...wayne..

    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

  3. Re: crtimes discrepancy on PPC

    On Mon, Sep 29, 2008 at 02:47:53PM -0700, Wayne Davison wrote:
    > reordering the args in the ifs so that an underflow can't trigger a
    > spurious successful test.


    Actually, my change isn't good enough, since an underflow with the "if"
    vars reordered should actually indicate a match. So, my patch would
    need another compare to test for underflow. Your patch also needs an
    extra compare in the file1 >= file2 case:

    if (file1 - file2 <= modify_window && file1 - file2 >= 0)

    I guess I'll think about this more later.

    ...wayne..
    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


+ Reply to Thread