Details
-
Bug
-
Resolution: Fixed
-
Minor
-
Lustre 2.8.0
-
None
-
any
-
3
-
9223372036854775807
Description
File:lustre-wc-rel/lustre/osd-ldiskfs/osd_scrub.c
Line:785
static void osd_scrub_post(struct osd_scrub *scrub, int result)
{
struct scrub_file *sf = &scrub->os_file;
ENTRY;
CDEBUG(D_LFSCK, "%.16s: OI scrub post, result = %d\n",
osd_scrub2name(scrub), result);
.
.
.
sf->sf_run_time += cfs_duration_sec(cfs_time_current() + HALF_SEC -
scrub->os_time_last_checkpoint);
result = osd_scrub_file_store(scrub); <--- Assignment of function parameter has no effect outside the function.
up_write(&scrub->os_rwsem);
EXIT;
}
Called from:
static int osd_scrub_main(void *args)
{
struct lu_env env;
struct osd_device *dev = (struct osd_device *)args;
struct osd_scrub *scrub = &dev->od_scrub;
struct ptlrpc_thread *thread = &scrub->os_thread;
int rc;
ENTRY;
.
.
.
post:
osd_scrub_post(scrub, rc); <--- Called from here
CDEBUG(D_LFSCK, "%.16s: OI scrub: stop, pos = %u: rc = %d\n",
osd_scrub2name(scrub), scrub->os_pos_current, rc);
out:
while (!list_empty(&scrub->os_inconsistent_items)) {
struct osd_inconsistent_item *oii;
oii = list_entry(scrub->os_inconsistent_items.next,
struct osd_inconsistent_item, oii_list);
list_del_init(&oii->oii_list);
OBD_FREE_PTR(oii);
}
lu_env_fini(&env);
noenv:
spin_lock(&scrub->os_lock);
thread_set_flags(thread, SVC_STOPPED);
wake_up_all(&thread->t_ctl_waitq);
spin_unlock(&scrub->os_lock);
return rc;
}