Whamcloud - gitweb
LU-4423 lustre: don't declare extern variables in C files.
[fs/lustre-release.git] / lustre / lfsck / lfsck_layout.c
index 33563da..2bd58b0 100644 (file)
@@ -647,7 +647,7 @@ lfsck_rbtree_insert(struct lfsck_layout_slave_data *llsd,
        return lrn;
 }
 
-extern const struct dt_index_operations lfsck_orphan_index_ops;
+static const struct dt_index_operations lfsck_orphan_index_ops;
 
 static int lfsck_rbtree_setup(const struct lu_env *env,
                              struct lfsck_component *com)
@@ -5356,7 +5356,7 @@ static int lfsck_layout_scan_stripes(const struct lu_env *env,
                                     struct dt_object *parent,
                                     struct lov_mds_md_v1 *lmm, __u32 comp_id)
 {
-       struct lfsck_thread_info        *info    = lfsck_env_info(env);
+       struct lfsck_thread_info        *info    = lfsck_env_info(env);
        struct lfsck_instance           *lfsck   = com->lc_lfsck;
        struct lfsck_bookmark           *bk      = &lfsck->li_bookmark_ram;
        struct lfsck_layout             *lo      = com->lc_file_ram;
@@ -5366,7 +5366,6 @@ static int lfsck_layout_scan_stripes(const struct lu_env *env,
        struct lfsck_tgt_descs          *ltds    = &lfsck->li_ost_descs;
        struct ptlrpc_thread            *mthread = &lfsck->li_thread;
        struct ptlrpc_thread            *athread = &lad->lad_thread;
-       struct l_wait_info               lwi     = { 0 };
        struct lu_buf                    buf;
        int                              rc      = 0;
        int                              i;
@@ -5396,11 +5395,10 @@ static int lfsck_layout_scan_stripes(const struct lu_env *env,
                if (unlikely(lovea_slot_is_dummy(objs)))
                        continue;
 
-               l_wait_event(mthread->t_ctl_waitq,
-                            lad->lad_prefetched < bk->lb_async_windows ||
-                            !thread_is_running(mthread) ||
-                            thread_is_stopped(athread),
-                            &lwi);
+               wait_event_idle(mthread->t_ctl_waitq,
+                               lad->lad_prefetched < bk->lb_async_windows ||
+                               !thread_is_running(mthread) ||
+                               thread_is_stopped(athread));
 
                if (unlikely(!thread_is_running(mthread)) ||
                             thread_is_stopped(athread))
@@ -7521,7 +7519,7 @@ static int lfsck_orphan_it_key_rec(const struct lu_env *env,
        return 0;
 }
 
-const struct dt_index_operations lfsck_orphan_index_ops = {
+static const struct dt_index_operations lfsck_orphan_index_ops = {
        .dio_lookup             = lfsck_orphan_index_lookup,
        .dio_declare_insert     = lfsck_orphan_index_declare_insert,
        .dio_insert             = lfsck_orphan_index_insert,