MCPcopy Create free account
hub / github.com/RsyncProject/rsync / xattr_lookup_hash

Function xattr_lookup_hash

xattrs.c:380–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380static int64 xattr_lookup_hash(const item_list *xalp)
381{
382 const rsync_xa *rxas = xalp->items;
383 size_t i;
384 int64 key = hashlittle2(&xalp->count, sizeof xalp->count);
385
386 for (i = 0; i < xalp->count; i++) {
387 key += hashlittle2(rxas[i].name, rxas[i].name_len);
388 if (rxas[i].datum_len > MAX_FULL_DATUM)
389 key += hashlittle2(rxas[i].datum, xattr_sum_len);
390 else
391 key += hashlittle2(rxas[i].datum, rxas[i].datum_len);
392 }
393
394 return key;
395}
396
397static int find_matching_xattr(const item_list *xalp)
398{

Callers 2

find_matching_xattrFunction · 0.85
rsync_xal_storeFunction · 0.85

Calls 1

hashlittle2Function · 0.85

Tested by

no test coverage detected