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-3508 test: small fix for sanity.sh test_101c
[fs/lustre-release.git]
/
lustre
/
lfsck
/
lfsck_lib.c
diff --git
a/lustre/lfsck/lfsck_lib.c
b/lustre/lfsck/lfsck_lib.c
index
6e20069
..
b5def07
100644
(file)
--- a/
lustre/lfsck/lfsck_lib.c
+++ b/
lustre/lfsck/lfsck_lib.c
@@
-100,7
+100,7
@@
static inline void lfsck_component_put(const struct lu_env *env,
{
if (atomic_dec_and_test(&com->lc_ref)) {
if (com->lc_obj != NULL)
- lu_object_put(env, &com->lc_obj->do_lu);
+ lu_object_put
_nocache
(env, &com->lc_obj->do_lu);
if (com->lc_file_ram != NULL)
OBD_FREE(com->lc_file_ram, com->lc_file_size);
if (com->lc_file_disk != NULL)
@@
-167,7
+167,7
@@
static void lfsck_instance_cleanup(const struct lu_env *env,
LASSERT(thread_is_init(thread) || thread_is_stopped(thread));
if (lfsck->li_obj_oit != NULL) {
- lu_object_put(env, &lfsck->li_obj_oit->do_lu);
+ lu_object_put
_nocache
(env, &lfsck->li_obj_oit->do_lu);
lfsck->li_obj_oit = NULL;
}
@@
-197,7
+197,7
@@
static void lfsck_instance_cleanup(const struct lu_env *env,
}
if (lfsck->li_bookmark_obj != NULL) {
- lu_object_put(env, &lfsck->li_bookmark_obj->do_lu);
+ lu_object_put
_nocache
(env, &lfsck->li_bookmark_obj->do_lu);
lfsck->li_bookmark_obj = NULL;
}
@@
-207,7
+207,7
@@
static void lfsck_instance_cleanup(const struct lu_env *env,
}
if (lfsck->li_local_root != NULL) {
- lu_object_put(env, &lfsck->li_local_root->do_lu);
+ lu_object_put
_nocache
(env, &lfsck->li_local_root->do_lu);
lfsck->li_local_root = NULL;
}
@@
-372,12
+372,12
@@
static void __lfsck_set_speed(struct lfsck_instance *lfsck, __u32 limit)
{
lfsck->li_bookmark_ram.lb_speed_limit = limit;
if (limit != LFSCK_SPEED_NO_LIMIT) {
- if (limit >
CFS_
HZ) {
- lfsck->li_sleep_rate = limit /
CFS_
HZ;
+ if (limit > HZ) {
+ lfsck->li_sleep_rate = limit / HZ;
lfsck->li_sleep_jif = 1;
} else {
lfsck->li_sleep_rate = 1;
- lfsck->li_sleep_jif =
CFS_
HZ / limit;
+ lfsck->li_sleep_jif = HZ / limit;
}
} else {
lfsck->li_sleep_jif = 0;
@@
-869,7
+869,7
@@
int lfsck_start(const struct lu_env *env, struct dt_device *key,
struct lfsck_component *com;
struct l_wait_info lwi = { 0 };
bool dirty = false;
-
int
rc = 0;
+
long
rc = 0;
__u16 valid = 0;
__u16 flags = 0;
ENTRY;
@@
-1013,18
+1013,19
@@
trigger:
lfsck->li_args_oit = (flags << DT_OTABLE_IT_FLAGS_SHIFT) | valid;
thread_set_flags(thread, 0);
- if (lfsck->li_master)
- rc = PTR_ERR(kthread_run(lfsck_master_engine, lfsck, "lfsck"));
- if (rc < 0)
- CERROR("%s: cannot start LFSCK thread, rc = %d\n",
+ rc = PTR_ERR(kthread_run(lfsck_master_engine, lfsck, "lfsck"));
+ if (IS_ERR_VALUE(rc)) {
+ CERROR("%s: cannot start LFSCK thread, rc = %ld\n",
lfsck_lfsck2name(lfsck), rc);
- else
+ } else {
+ rc = 0;
l_wait_event(thread->t_ctl_waitq,
thread_is_running(thread) ||
thread_is_stopped(thread),
&lwi);
+ }
- GOTO(out, rc
= 0
);
+ GOTO(out, rc);
out:
mutex_unlock(&lfsck->li_mutex);