MCPcopy Create free account
hub / github.com/F-Stack/f-stack / l2arc_range_check_overlap

Function l2arc_range_check_overlap

freebsd/contrib/openzfs/module/zfs/arc.c:10628–10637  ·  view source on GitHub ↗

* Checks whether a given L2ARC device address sits in a time-sequential * range. The trick here is that the L2ARC is a rotary buffer, so we can't * just do a range comparison, we need to handle the situation in which the * range wraps around the end of the L2ARC device. Arguments: * bottom -- Lower end of the range to check (written to earlier). * top -- Upper end of the range to check (wr

Source from the content-addressed store, hash-verified

10626 * top == bottom : Just a single address comparison.
10627 */
10628boolean_t
10629l2arc_range_check_overlap(uint64_t bottom, uint64_t top, uint64_t check)
10630{
10631 if (bottom < top)
10632 return (bottom <= check && check <= top);
10633 else if (bottom > top)
10634 return (check <= top || bottom <= check);
10635 else
10636 return (check == top);
10637}
10638
10639EXPORT_SYMBOL(arc_buf_size);
10640EXPORT_SYMBOL(arc_write);

Callers 4

l2arc_rebuildFunction · 0.85
l2arc_dev_hdr_readFunction · 0.85
l2arc_log_blkptr_validFunction · 0.85
dump_l2arc_log_blocksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected