Whamcloud - gitweb
LU-9816 kernel: kernel upgrade RHEL7.4 [3.10.0-693.el7]
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_scrub.h
index f046e33..a722692 100644 (file)
@@ -20,7 +20,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
  */
 /*
  * lustre/osd-ldiskfs/osd_scrub.h
@@ -96,14 +96,17 @@ enum scrub_start {
        /* Reset scrub start position. */
        SS_RESET                = 0x00000004,
 
-       /* Trigger scrub automatically. */
-       SS_AUTO                 = 0x00000008,
+       /* Trigger full scrub automatically. */
+       SS_AUTO_FULL            = 0x00000008,
+
+       /* Trigger partial scrub automatically. */
+       SS_AUTO_PARTIAL         = 0x00000010,
 
        /* Set dryrun flag. */
-       SS_SET_DRYRUN           = 0x00000010,
+       SS_SET_DRYRUN           = 0x00000020,
 
        /* Clear dryrun flag. */
-       SS_CLEAR_DRYRUN         = 0x00000020,
+       SS_CLEAR_DRYRUN         = 0x00000040,
 };
 
 /* The flags here are only used inside OSD, NOT be visible by dump(). */
@@ -183,10 +186,20 @@ struct scrub_file {
        __u8    sf_oi_bitmap[SCRUB_OI_BITMAP_SIZE];
 };
 
+struct osd_iit_param {
+       struct super_block *sb;
+       struct buffer_head *bitmap;
+       ldiskfs_group_t bg;
+       __u32 gbase;
+       __u32 offset;
+       __u32 start;
+};
+
 struct osd_scrub {
        struct lvfs_run_ctxt    os_ctxt;
        struct ptlrpc_thread    os_thread;
        struct osd_idmap_cache  os_oic;
+       struct osd_iit_param    os_iit_param;
        struct list_head        os_inconsistent_items;
 
        /* write lock for scrub prep/update/post/checkpoint,
@@ -228,7 +241,12 @@ struct osd_scrub {
                                os_waiting:1, /* Waiting for scan window. */
                                os_full_speed:1, /* run w/o speed limit */
                                os_paused:1, /* The scrub is paused. */
-                               os_convert_igif:1;
+                               os_convert_igif:1,
+                               os_partial_scan:1,
+                               os_in_join:1,
+                               os_full_scrub:1;
+       __u64                   os_bad_oimap_count;
+       __u64                   os_bad_oimap_time;
 };
 
 #endif /* _OSD_SCRUB_H */