| 524 | } |
| 525 | |
| 526 | static int midx_compaction_step_exec(struct midx_compaction_step *step, |
| 527 | struct repack_write_midx_opts *opts, |
| 528 | const char *base) |
| 529 | { |
| 530 | switch (step->type) { |
| 531 | case MIDX_COMPACTION_STEP_UNKNOWN: |
| 532 | BUG("cannot execute UNKNOWN midx compaction step"); |
| 533 | case MIDX_COMPACTION_STEP_COPY: |
| 534 | return midx_compaction_step_exec_copy(step); |
| 535 | case MIDX_COMPACTION_STEP_WRITE: |
| 536 | return midx_compaction_step_exec_write(step, opts, base); |
| 537 | case MIDX_COMPACTION_STEP_COMPACT: |
| 538 | return midx_compaction_step_exec_compact(step, opts); |
| 539 | default: |
| 540 | BUG("unhandled midx compaction step type %d", step->type); |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | static void midx_compaction_step_release(struct midx_compaction_step *step) |
| 545 | { |
no test coverage detected