Whamcloud - gitweb
LU-1866 osd: ancillary work for initial OI scrub
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_scrub.h
index 5c9df6d..fcb0ae3 100644 (file)
@@ -20,7 +20,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012 Whamcloud, Inc.
+ * Copyright (c) 2012, Intel Corporation.
  */
 /*
  * lustre/osd-ldiskfs/osd_scrub.h
@@ -55,10 +55,13 @@ enum scrub_status {
        SS_FAILED       = 3,
 
        /* The scrub is stopped manually, the OI files may be inconsistent. */
-       SS_PAUSED       = 4,
+       SS_STOPPED      = 4,
+
+       /* The scrub is paused automatically when umount. */
+       SS_PAUSED       = 5,
 
        /* The scrub crashed during the scanning, should be restarted. */
-       SS_CRASHED      = 5,
+       SS_CRASHED      = 6,
 };
 
 enum scrub_flags {
@@ -137,6 +140,12 @@ struct scrub_file {
        /* How many prior objects have been updated during scanning. */
        __u64   sf_items_updated_prior;
 
+       /* How many objects marked as LDISKFS_STATE_LUSTRE_NOSCRUB. */
+       __u64   sf_items_noscrub;
+
+       /* How many IGIF objects. */
+       __u64   sf_items_igif;
+
        /* How long the OI scrub has run. */
        __u32   sf_run_time;
 
@@ -163,8 +172,8 @@ struct osd_scrub {
 
        /* write lock for scrub prep/update/post/checkpoint,
         * read lock for scrub dump. */
-       cfs_rw_semaphore_t      os_rwsem;
-       cfs_spinlock_t          os_lock;
+       struct rw_semaphore     os_rwsem;
+       spinlock_t              os_lock;
 
        /* Scrub file in memory. */
        struct scrub_file       os_file;
@@ -189,7 +198,7 @@ struct osd_scrub {
                                                * found by RPC prior */
                                os_waiting:1, /* Waiting for scan window. */
                                os_full_speed:1, /* run w/o speed limit */
-                               os_no_scrub:1; /* NOT auto trigger OI scrub*/
+                               os_paused:1; /* The scrub is paused. */
 };
 
 #endif /* _OSD_SCRUB_H */