Basic Solution File System - BSFS
Loading...
Searching...
No Matches
purge.c File Reference

Implements the purge command for the BSFS filesystem. More...

Classes

struct  rec_item_t
 Internal item wrapper used during Recovery GC traversals. More...

Functions

int purge (FILE *disk, superblock_t *sb, char **args)
 BSFS browser command: purge Recovery snapshots to reclaim space.

Detailed Description

Implements the purge command for the BSFS filesystem.

Allows users to reclaim space by removing Recovery snapshots:

  • purge -> remove entries older than ~30 days
  • purge <id> -> remove a specific snapshot by Recovery ID
  • purge oldest <count> -> remove the <count> oldest snapshots

Function Documentation

◆ purge()

int purge ( FILE * disk,
superblock_t * sb,
char ** args )

BSFS browser command: purge Recovery snapshots to reclaim space.

Usage:

  • purge -> remove entries older than ~30 days
  • purge <id> -> remove a specific snapshot by Recovery ID
  • purge oldest <count> -> remove the <count> oldest snapshots
Parameters
diskOpen filesystem image.
sbLoaded superblock.
argsTokenized arguments per usage above.
Returns
Always 1 to continue the browser loop.