Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-15880 quota: fix issues in reserving quota
[fs/lustre-release.git]
/
lustre
/
include
/
lustre_scrub.h
diff --git
a/lustre/include/lustre_scrub.h
b/lustre/include/lustre_scrub.h
index
38d4fb5
..
1911830
100644
(file)
--- a/
lustre/include/lustre_scrub.h
+++ b/
lustre/include/lustre_scrub.h
@@
-240,7
+240,7
@@
struct scrub_file {
* to time64_t since this breaks backwards compatibility.
* It shouldn't take more than 136 years to complete :-)
*/
* to time64_t since this breaks backwards compatibility.
* It shouldn't take more than 136 years to complete :-)
*/
-
time_t
sf_run_time;
+
s32
sf_run_time;
/* How many completed OI scrub ran on the device. */
__u32 sf_success_count;
/* How many completed OI scrub ran on the device. */
__u32 sf_success_count;
@@
-262,7
+262,7
@@
struct lustre_scrub {
/* Object for the scrub file. */
struct dt_object *os_obj;
/* Object for the scrub file. */
struct dt_object *os_obj;
- struct
ptlrpc_thread os_thread
;
+ struct
task_struct *os_task
;
struct list_head os_inconsistent_items;
/* write lock for scrub prep/update/post/checkpoint,
struct list_head os_inconsistent_items;
/* write lock for scrub prep/update/post/checkpoint,
@@
-284,10
+284,17
@@
struct lustre_scrub {
/* The time for next checkpoint, seconds */
time64_t os_time_next_checkpoint;
/* The time for next checkpoint, seconds */
time64_t os_time_next_checkpoint;
+ /* How long to wait to start scrubbing */
+ time64_t os_auto_scrub_interval;
+
/* How many objects have been checked since last checkpoint. */
__u64 os_new_checked;
__u64 os_pos_current;
__u32 os_start_flags;
/* How many objects have been checked since last checkpoint. */
__u64 os_new_checked;
__u64 os_pos_current;
__u32 os_start_flags;
+ /* Some of these bits can be set by different threads so
+ * all updates must be protected by ->os_lock to avoid
+ * racing read-modify-write cycles causing corruption.
+ */
unsigned int os_in_prior:1, /* process inconsistent item
* found by RPC prior */
os_waiting:1, /* Waiting for scan window. */
unsigned int os_in_prior:1, /* process inconsistent item
* found by RPC prior */
os_waiting:1, /* Waiting for scan window. */
@@
-296,7
+303,9
@@
struct lustre_scrub {
os_convert_igif:1,
os_partial_scan:1,
os_in_join:1,
os_convert_igif:1,
os_partial_scan:1,
os_in_join:1,
- os_full_scrub:1;
+ os_running:1, /* scrub thread is running */
+ os_full_scrub:1,
+ os_has_ml_file:1;
};
#define INDEX_BACKUP_MAGIC_V1 0x1E41F208
};
#define INDEX_BACKUP_MAGIC_V1 0x1E41F208
@@
-339,7
+348,13
@@
void scrub_file_init(struct lustre_scrub *scrub, uuid_t uuid);
void scrub_file_reset(struct lustre_scrub *scrub, uuid_t uuid, u64 flags);
int scrub_file_load(const struct lu_env *env, struct lustre_scrub *scrub);
int scrub_file_store(const struct lu_env *env, struct lustre_scrub *scrub);
void scrub_file_reset(struct lustre_scrub *scrub, uuid_t uuid, u64 flags);
int scrub_file_load(const struct lu_env *env, struct lustre_scrub *scrub);
int scrub_file_store(const struct lu_env *env, struct lustre_scrub *scrub);
+bool scrub_needs_check(struct lustre_scrub *scrub, const struct lu_fid *fid,
+ u64 index);
int scrub_checkpoint(const struct lu_env *env, struct lustre_scrub *scrub);
int scrub_checkpoint(const struct lu_env *env, struct lustre_scrub *scrub);
+int scrub_thread_prep(const struct lu_env *env, struct lustre_scrub *scrub,
+ uuid_t uuid, u64 start);
+int scrub_thread_post(const struct lu_env *env, struct lustre_scrub *scrub,
+ int result);
int scrub_start(int (*threadfn)(void *data), struct lustre_scrub *scrub,
void *data, __u32 flags);
void scrub_stop(struct lustre_scrub *scrub);
int scrub_start(int (*threadfn)(void *data), struct lustre_scrub *scrub,
void *data, __u32 flags);
void scrub_stop(struct lustre_scrub *scrub);