The branch, master has been updated via a720d81 Fix "could not find xattr #1" errors. from 359758d Fix path check when prior_dir_file is NULL.
https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit a720d81d0a81cf1b5f2616e93e26ebe4547c1aed Author: Wayne Davison <way...@samba.org> Date: Sun Jun 26 11:46:18 2016 -0700 Fix "could not find xattr #1" errors. The abbreviated-xattr code can get requests that are not in the same order as the xattr list, so we need to support wrap-around scanning of the available xattrs. Fixes bug 6590. ----------------------------------------------------------------------- Summary of changes: xattrs.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/xattrs.c b/xattrs.c index 6a77a0b..0658afb 100644 --- a/xattrs.c +++ b/xattrs.c @@ -611,10 +611,32 @@ int recv_xattr_request(struct file_struct *file, int f_in) num = 0; while ((rel_pos = read_varint(f_in)) != 0) { num += rel_pos; - /* Note that the sender-related num values may not be in order on the receiver! */ - while (cnt && (am_sender ? rxa->num < num : rxa->num != num)) { - rxa++; - cnt--; + if (am_sender) { + /* The sender-related num values are only in order on the sender. + * We use that order here to scan foward or backward as needed. */ + if (rel_pos < 0) { + while (cnt < (int)lst->count && rxa->num > num) { + rxa--; + cnt++; + } + } else { + while (cnt > 1 && rxa->num < num) { + rxa++; + cnt--; + } + } + } else { + int j; + /* The receiving side has no known num order, so we just scan + * forward (w/wrap) and hope that the next value is near by. */ + for (j = lst->count; j > 1 && rxa->num != num; j--) { + if (--cnt) + rxa++; + else { + cnt = lst->count; + rxa = lst->items; + } + } } if (!cnt || rxa->num != num) { rprintf(FERROR, "[%s] could not find xattr #%d for %s\n", -- The rsync repository. _______________________________________________ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs