X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre_scrub.h;h=415ef852833421af67b1659e3419e62ee8d9eaf1;hb=7a9c0ca690eb00a6e314322b62fb1fd3e9b31f0e;hp=313af0f9eb4d9ffba6e3b7ee2862459c3148eb0b;hpb=a114f6b8c52bb97dcad093e5cb32b903ae9f602f;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre_scrub.h b/lustre/include/lustre_scrub.h index 313af0f..415ef85 100644 --- a/lustre/include/lustre_scrub.h +++ b/lustre/include/lustre_scrub.h @@ -262,7 +262,7 @@ struct lustre_scrub { /* 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, @@ -288,6 +288,10 @@ struct lustre_scrub { __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. */ @@ -296,6 +300,7 @@ struct lustre_scrub { os_convert_igif:1, os_partial_scan:1, os_in_join:1, + os_running:1, /* scrub thread is running */ os_full_scrub:1; };