adds all the directory entries in a segment to the segment freelist
| 586 | // adds all the directory entries |
| 587 | // in a segment to the segment freelist |
| 588 | void |
| 589 | StripeSM::dir_init_segment(int s) |
| 590 | { |
| 591 | this->freelist[s] = 0; |
| 592 | CacheDirEntry *seg = this->dir_segment(s); |
| 593 | int l, b; |
| 594 | memset(seg, 0, SIZEOF_DIR * DIR_DEPTH * this->_buckets); |
| 595 | for (l = 1; l < DIR_DEPTH; l++) { |
| 596 | for (b = 0; b < this->_buckets; b++) { |
| 597 | CacheDirEntry *bucket = dir_bucket(b, seg); |
| 598 | this->dir_free_entry(dir_bucket_row(bucket, l), s); |
| 599 | } |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | void |
| 604 | StripeSM::init_dir() |
no test coverage detected