-#define SCRUB_MAGIC_V1 0x4C5FD252
-#define SCRUB_CHECKPOINT_INTERVAL 60
-#define SCRUB_OI_BITMAP_SIZE (OSD_OI_FID_NR_MAX >> 3)
-#define SCRUB_WINDOW_SIZE 1024
-
-enum scrub_status {
- /* The scrub file is new created, for new MDT, upgrading from old disk,
- * or re-creating the scrub file manually. */
- SS_INIT = 0,
-
- /* The scrub is checking/repairing the OI files. */
- SS_SCANNING = 1,
-
- /* The scrub checked/repaired the OI files successfully. */
- SS_COMPLETED = 2,
-
- /* The scrub failed to check/repair the OI files. */
- SS_FAILED = 3,
-
- /* The scrub is stopped manually, the OI files may be inconsistent. */
- SS_STOPPED = 4,
-
- /* The scrub is paused automatically when umount. */
- SS_PAUSED = 5,
-
- /* The scrub crashed during the scanning, should be restarted. */
- SS_CRASHED = 6,
-};
-
-enum scrub_flags {
- /* OI files have been recreated, OI mappings should be re-inserted. */
- SF_RECREATED = 0x0000000000000001ULL,
-
- /* OI files are invalid, should be rebuild ASAP */
- SF_INCONSISTENT = 0x0000000000000002ULL,
-
- /* OI scrub is triggered automatically. */
- SF_AUTO = 0x0000000000000004ULL,
-
- /* The device is upgraded from 1.8 format. */
- SF_UPGRADE = 0x0000000000000008ULL,
-};
-
-enum scrub_param {
- /* Exit when fail. */
- SP_FAILOUT = 0x0001,
-
- /* Check only without repairing. */
- SP_DRYRUN = 0x0002,
-};
-
-enum scrub_start {
- /* Set failout flag. */
- SS_SET_FAILOUT = 0x00000001,
-
- /* Clear failout flag. */
- SS_CLEAR_FAILOUT = 0x00000002,
-
- /* Reset scrub start position. */
- SS_RESET = 0x00000004,
-
- /* Trigger scrub automatically. */
- SS_AUTO = 0x00000008,
-
- /* Set dryrun flag. */
- SS_SET_DRYRUN = 0x00000010,
-
- /* Clear dryrun flag. */
- SS_CLEAR_DRYRUN = 0x00000020,
-};
-