MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / cplace

Function cplace

dep/hfsutils/libhfs/block.c:435–454  ·  view source on GitHub ↗

* NAME: cplace() * DESCRIPTION: move a bucket to an appropriate place near head of the chain */

Source from the content-addressed store, hash-verified

433 * DESCRIPTION: move a bucket to an appropriate place near head of the chain
434 */
435static
436void cplace(bcache *cache, bucket *b)
437{
438 bucket *p;
439
440 for (p = cache->tail->cnext; p->count > 1; p = p->cnext)
441 --p->count;
442
443 b->cnext->cprev = b->cprev;
444 b->cprev->cnext = b->cnext;
445
446 if (cache->tail == b)
447 cache->tail = b->cprev;
448
449 b->cprev = p->cprev;
450 b->cnext = p;
451
452 p->cprev->cnext = b;
453 p->cprev = b;
454}
455
456/*
457 * NAME: hplace()

Callers 1

getbucketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected