* 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
| 10626 | * top == bottom : Just a single address comparison. |
| 10627 | */ |
| 10628 | boolean_t |
| 10629 | l2arc_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 | |
| 10639 | EXPORT_SYMBOL(arc_buf_size); |
| 10640 | EXPORT_SYMBOL(arc_write); |
no outgoing calls
no test coverage detected