| 669 | #endif |
| 670 | |
| 671 | int |
| 672 | StripeSM::dir_freelist_length(int s) |
| 673 | { |
| 674 | int free = 0; |
| 675 | CacheDirEntry *seg = this->dir_segment(s); |
| 676 | CacheDirEntry *e = dir_from_offset(this->freelist[s], seg); |
| 677 | if (this->check_loop(s)) { |
| 678 | return (DIR_DEPTH - 1) * this->_buckets; |
| 679 | } |
| 680 | while (e) { |
| 681 | free++; |
| 682 | e = next_dir(e, seg); |
| 683 | } |
| 684 | return free; |
| 685 | } |
| 686 | |
| 687 | int |
| 688 | StripeSM::check_loop(int s) |
nothing calls this directly
no test coverage detected