Whamcloud - gitweb
LU-3445 utils: make add_param() handle comma-separated values
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_scrub.h
index c2bae71..03d90ab 100644 (file)
@@ -20,7 +20,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * lustre/osd-ldiskfs/osd_scrub.h
@@ -97,6 +97,12 @@ enum scrub_start {
        SS_AUTO                 = 0x00000008,
 };
 
+/* The flags here are only used inside OSD, NOT be visible by dump(). */
+enum scrub_internal_flags {
+       /* This is a new formatted device. */
+       SIF_NO_HANDLE_OLD_FID   = 0x0001,
+};
+
 struct scrub_file {
        /* 128-bit uuid for volume. */
        __u8    sf_uuid[16];
@@ -158,8 +164,9 @@ struct scrub_file {
        /* How many OI files. */
        __u16   sf_oi_count;
 
-       /* Update the magic or flags if want to use the reserved fields. */
-       __u16   sf_reserved_0;
+       /* Keep the flags after scrub reset. See 'enum scrub_internal_flags' */
+       __u16   sf_internal_flags;
+
        __u32   sf_reserved_1;
        __u64   sf_reserved_2[16];
 
@@ -193,6 +200,16 @@ struct osd_scrub {
        /* The time for next checkpoint, jiffies */
        cfs_time_t              os_time_next_checkpoint;
 
+       /* statistics for /lost+found are in ram only, it will be reset
+        * when each time the device remount. */
+
+       /* How many objects have been scanned during initial OI scrub. */
+       __u64                   os_lf_scanned;
+       /* How many objects have been repaired during initial OI scrub. */
+       __u64                   os_lf_repaired;
+       /* How many objects failed to be processed during initial OI scrub. */
+       __u64                   os_lf_failed;
+
        /* How many objects have been checked since last checkpoint. */
        __u32                   os_new_checked;
        __u32                   os_pos_current;
@@ -201,7 +218,8 @@ struct osd_scrub {
                                                * found by RPC prior */
                                os_waiting:1, /* Waiting for scan window. */
                                os_full_speed:1, /* run w/o speed limit */
-                               os_paused:1; /* The scrub is paused. */
+                               os_paused:1, /* The scrub is paused. */
+                               os_convert_igif:1;
 };
 
 #endif /* _OSD_SCRUB_H */