| 495 | } |
| 496 | |
| 497 | CacheDirEntry * |
| 498 | StripeSM::dir_delete_entry(CacheDirEntry *e, CacheDirEntry *p, int s) |
| 499 | { |
| 500 | CacheDirEntry *seg = this->dir_segment(s); |
| 501 | int no = dir_next(e); |
| 502 | this->_meta[0][0].dirty = 1; |
| 503 | if (p) { |
| 504 | unsigned int fo = this->freelist[s]; |
| 505 | unsigned int eo = dir_to_offset(e, seg); |
| 506 | dir_clear(e); |
| 507 | dir_set_next(p, no); |
| 508 | dir_set_next(e, fo); |
| 509 | if (fo) { |
| 510 | dir_set_prev(dir_from_offset(fo, seg), eo); |
| 511 | } |
| 512 | this->freelist[s] = eo; |
| 513 | } else { |
| 514 | CacheDirEntry *n = next_dir(e, seg); |
| 515 | if (n) { |
| 516 | dir_assign(e, n); |
| 517 | dir_delete_entry(n, e, s); |
| 518 | return e; |
| 519 | } else { |
| 520 | dir_clear(e); |
| 521 | return nullptr; |
| 522 | } |
| 523 | } |
| 524 | return dir_from_offset(no, seg); |
| 525 | } |
| 526 | |
| 527 | void |
| 528 | StripeSM::walk_all_buckets() |
nothing calls this directly
no test coverage detected