return 0;
}
- /* brand new or create by force */
- LIBCFS_ALLOC(sn, sizeof(sfw_session_t));
- if (sn == NULL) {
- CERROR ("Dropping RPC (mksn) under memory pressure.\n");
- return -ENOMEM;
- }
+ /* brand new or create by force */
+ LIBCFS_ALLOC(sn, sizeof(sfw_session_t));
+ if (sn == NULL) {
+ CERROR("dropping RPC mksn under memory pressure\n");
+ return -ENOMEM;
+ }
sfw_init_session(sn, request->mksn_sid,
msg->msg_ses_feats, &request->mksn_name[0]);
return 0;
}
- bat = sfw_bid2batch(request->tsr_bid);
- if (bat == NULL) {
- CERROR ("Dropping RPC (%s) from %s under memory pressure.\n",
+ bat = sfw_bid2batch(request->tsr_bid);
+ if (bat == NULL) {
+ CERROR("dropping RPC %s from %s under memory pressure\n",
rpc->srpc_scd->scd_svc->sv_name,
libcfs_id2str(rpc->srpc_peer));
return -ENOMEM;
/* Remove timer to avoid racing with it or expiring active session */
if (sfw_del_session_timer() != 0) {
- CERROR("Dropping RPC (%s) from %s: racing with expiry timer.",
+ CERROR("dropping RPC %s from %s: racing with expiry timer\n",
sv->sv_name, libcfs_id2str(rpc->srpc_peer));
spin_unlock(&sfw_data.fw_lock);
return -EAGAIN;
}
if (sfw_del_session_timer() != 0) {
- CERROR("Dropping RPC (%s) from %s: racing with expiry timer",
+ CERROR("dropping RPC %s from %s: racing with expiry timer\n",
sv->sv_name, libcfs_id2str(rpc->srpc_peer));
spin_unlock(&sfw_data.fw_lock);
return -EAGAIN;
}
if (scd->scd_buf_nposted > 0) {
- CDEBUG(D_NET, "waiting for %d posted buffers to unlink",
- scd->scd_buf_nposted);
+ CDEBUG(D_NET, "waiting for %d posted buffers to "
+ "unlink\n", scd->scd_buf_nposted);
spin_unlock(&scd->scd_lock);
return 0;
}
/* concurrent cancels on the same handle can happen */
lock = ldlm_handle2lock_long(lockh, LDLM_FL_CANCELING);
- if (lock == NULL) {
- LDLM_DEBUG_NOLOCK("lock is already being destroyed\n");
- RETURN(0);
- }
+ if (lock == NULL) {
+ LDLM_DEBUG_NOLOCK("lock is already being destroyed");
+ RETURN(0);
+ }
- rc = ldlm_cli_cancel_local(lock);
+ rc = ldlm_cli_cancel_local(lock);
if (rc == LDLM_FL_LOCAL_ONLY || cancel_flags & LCF_LOCAL) {
LDLM_LOCK_RELEASE(lock);
RETURN(0);
rc = ll_md_real_close(file->f_dentry->d_inode,
fd->fd_omode);
}
- } else {
- CERROR("Releasing a file %p with negative dentry %p. Name %s",
- file, file->f_dentry, file->f_dentry->d_name.name);
- }
+ } else {
+ CERROR("released file has negative dentry: file = %p, "
+ "dentry = %p, name = %s\n",
+ file, file->f_dentry, file->f_dentry->d_name.name);
+ }
out:
LUSTRE_FPRIVATE(file) = NULL;
oinfo.oi_oa->o_flags |= OBD_FL_FLUSH;
}
- set = ptlrpc_prep_set();
- if (set == NULL) {
- CERROR("can't allocate ptlrpc set\n");
- rc = -ENOMEM;
- } else {
+ set = ptlrpc_prep_set();
+ if (set == NULL) {
+ CERROR("cannot allocate ptlrpc set: rc = %d\n", -ENOMEM);
+ rc = -ENOMEM;
+ } else {
rc = obd_getattr_async(exp, &oinfo, set);
if (rc == 0)
rc = ptlrpc_set_wait(set);
CDEBUG(D_VFSTRACE, "Restart %s on %s from %lld, count:%zd\n",
iot == CIT_READ ? "read" : "write",
file->f_dentry->d_name.name, *ppos, count);
- LASSERTF(io->ci_nob == 0, "%zd", io->ci_nob);
+ LASSERTF(io->ci_nob == 0, "%zd\n", io->ci_nob);
goto restart;
}
LASSERT(lock != NULL);
LASSERT(ldlm_has_layout(lock));
- LDLM_DEBUG(lock, "file "DFID"(%p) being reconfigured: %d\n",
+ LDLM_DEBUG(lock, "file "DFID"(%p) being reconfigured: %d",
PFID(&lli->lli_fid), inode, reconf);
/* in case this is a caching lock and reinstate with new inode */
it.it_op = IT_LAYOUT;
lockh.cookie = 0ULL;
- LDLM_DEBUG_NOLOCK("%s: requeue layout lock for file "DFID"(%p)\n",
+ LDLM_DEBUG_NOLOCK("%s: requeue layout lock for file "DFID"(%p)",
ll_get_fsname(inode->i_sb, NULL, 0),
PFID(&lli->lli_fid), inode);
obd->obd_proc_entry,
NULL, NULL);
if (IS_ERR(lmv->targets_proc_entry)) {
- CERROR("could not register /proc/fs/lustre/%s/%s/target_obds.",
- obd->obd_type->typ_name, obd->obd_name);
+ CERROR("%s: cannot register "
+ "/proc/fs/lustre/%s/%s/target_obds\n",
+ obd->obd_name, obd->obd_type->typ_name,
+ obd->obd_name);
lmv->targets_proc_entry = NULL;
}
}
cookiesize, def_cookiesize);
if (rc) {
CERROR("%s: obd_init_ea_size() failed on MDT target %d:"
- " rc = %d.\n", obd->obd_name, i, rc);
+ " rc = %d\n", obd->obd_name, i, rc);
break;
}
}
mdc_obd->obd_type->typ_name,
mdc_obd->obd_name);
if (mdc_symlink == NULL) {
- CERROR("Could not register LMV target "
- "/proc/fs/lustre/%s/%s/target_obds/%s.",
+ CERROR("cannot register LMV target "
+ "/proc/fs/lustre/%s/%s/target_obds/%s\n",
obd->obd_type->typ_name, obd->obd_name,
mdc_obd->obd_name);
}
struct lod_pool_iterator *iter = s->private;
int prev_idx;
- LASSERTF(iter->lpi_magic == POOL_IT_MAGIC, "%08X", iter->lpi_magic);
+ LASSERTF(iter->lpi_magic == POOL_IT_MAGIC, "%08X\n", iter->lpi_magic);
/* test if end of file */
if (*pos >= pool_tgt_count(iter->lpi_pool))
struct lod_pool_iterator *iter = v;
struct lod_tgt_desc *osc_desc;
- LASSERTF(iter->lpi_magic == POOL_IT_MAGIC, "%08X", iter->lpi_magic);
+ LASSERTF(iter->lpi_magic == POOL_IT_MAGIC, "%08X\n", iter->lpi_magic);
LASSERT(iter->lpi_pool != NULL);
LASSERT(iter->lpi_idx <= pool_tgt_count(iter->lpi_pool));
ENTRY;
LASSERTF(result <= 0 || result == CLO_REPEAT || result == CLO_WAIT,
- "result = %d", result);
+ "result = %d\n", result);
LASSERTF(rc <= 0 || rc == CLO_REPEAT || rc == CLO_WAIT,
"rc = %d\n", rc);
CLASSERT(CLO_WAIT < CLO_REPEAT);
osc_obd->obd_type->typ_name,
osc_obd->obd_name);
if (osc_symlink == NULL) {
- CERROR("could not register LOV target "
- "/proc/fs/lustre/%s/%s/target_obds/%s.",
+ CERROR("cannot register LOV target "
+ "/proc/fs/lustre/%s/%s/target_obds/%s\n",
obd->obd_type->typ_name, obd->obd_name,
osc_obd->obd_name);
- }
- }
- RETURN(0);
+ }
+ }
+ RETURN(0);
}
static int lov_connect(const struct lu_env *env,
obd->obd_proc_entry,
NULL, NULL);
if (IS_ERR(lov->targets_proc_entry)) {
- CERROR("%s: could not register /proc/fs/lustre/%s/%s/target_obds.",
+ CERROR("%s: cannot register "
+ "/proc/fs/lustre/%s/%s/target_obds\n",
obd->obd_name, obd->obd_type->typ_name, obd->obd_name);
lov->targets_proc_entry = NULL;
}
lov->desc.ld_active_tgt_count--;
lov->lov_tgts[index]->ltd_exp->exp_obd->obd_inactive = 1;
}
- } else {
- CERROR("Unknown event(%d) for uuid %s", ev, uuid->uuid);
- }
+ } else {
+ CERROR("%s: unknown event %d for uuid %s\n", obd->obd_name,
+ ev, uuid->uuid);
+ }
out:
- obd_putref(obd);
- RETURN(index);
+ obd_putref(obd);
+ RETURN(index);
}
static int lov_notify(struct obd_device *obd, struct obd_device *watched,
oqctl->qc_cmd != Q_INITQUOTA &&
oqctl->qc_cmd != LUSTRE_Q_SETQUOTA &&
oqctl->qc_cmd != Q_FINVALIDATE) {
- CERROR("bad quota opc %x for lov obd", oqctl->qc_cmd);
- RETURN(-EFAULT);
- }
+ CERROR("%s: bad quota opc %x for lov obd\n",
+ obd->obd_name, oqctl->qc_cmd);
+ RETURN(-EFAULT);
+ }
/* for lov tgt */
obd_getref(obd);
struct pool_iterator *iter = (struct pool_iterator *)s->private;
int prev_idx;
- LASSERTF(iter->magic == POOL_IT_MAGIC, "%08X", iter->magic);
+ LASSERTF(iter->magic == POOL_IT_MAGIC, "%08X\n", iter->magic);
/* test if end of file */
if (*pos >= pool_tgt_count(iter->pool))
struct pool_iterator *iter = (struct pool_iterator *)v;
struct lov_tgt_desc *tgt;
- LASSERTF(iter->magic == POOL_IT_MAGIC, "%08X", iter->magic);
- LASSERT(iter->pool != NULL);
- LASSERT(iter->idx <= pool_tgt_count(iter->pool));
+ LASSERTF(iter->magic == POOL_IT_MAGIC, "%08X\n", iter->magic);
+ LASSERT(iter->pool != NULL);
+ LASSERT(iter->idx <= pool_tgt_count(iter->pool));
down_read(&pool_tgt_rw_sem(iter->pool));
tgt = pool_tgt(iter->pool, iter->idx);
kunmap(pages[i]);
}
- LASSERTF(lu_pgs == 0, "left = %d", lu_pgs);
+ LASSERTF(lu_pgs == 0, "left = %d\n", lu_pgs);
}
#else
#define mdc_adjust_dirpages(pages, cfs_pgs, lu_pgs) do {} while (0)
ENTRY;
if (!try_module_get(THIS_MODULE)) {
- CERROR("Can't get module. Is it alive?");
+ CERROR("%s: cannot get module '%s'\n", obd->obd_name,
+ module_name(THIS_MODULE));
return -EINVAL;
}
switch (cmd) {
/* this should sync this object */
static int mdt_object_sync(struct mdt_thread_info *info)
{
- struct md_object *next;
- int rc;
- ENTRY;
+ struct md_object *next;
+ int rc;
+ ENTRY;
- if (!mdt_object_exists(info->mti_object)) {
- CWARN("Non existing object "DFID"!\n",
- PFID(mdt_object_fid(info->mti_object)));
- RETURN(-ESTALE);
- }
- next = mdt_object_child(info->mti_object);
- rc = mo_object_sync(info->mti_env, next);
+ if (!mdt_object_exists(info->mti_object)) {
+ CWARN("%s: non existing object "DFID": rc = %d\n",
+ mdt_obd_name(info->mti_mdt),
+ PFID(mdt_object_fid(info->mti_object)), -ESTALE);
+ RETURN(-ESTALE);
+ }
+ next = mdt_object_child(info->mti_object);
+ rc = mo_object_sync(info->mti_env, next);
- RETURN(rc);
+ RETURN(rc);
}
static int mdt_sync(struct tgt_session_info *tsi)
static void mdt_device_commit_async(const struct lu_env *env,
struct mdt_device *mdt)
{
- struct dt_device *dt = mdt->mdt_bottom;
- int rc;
+ struct dt_device *dt = mdt->mdt_bottom;
+ int rc;
- rc = dt->dd_ops->dt_commit_async(env, dt);
- if (unlikely(rc != 0))
- CWARN("async commit start failed with rc = %d", rc);
+ rc = dt->dd_ops->dt_commit_async(env, dt);
+ if (unlikely(rc != 0))
+ CWARN("%s: async commit start failed: rc = %d\n",
+ mdt_obd_name(mdt), rc);
}
/**
if (lock->l_req_mode == LCK_COS && lock->l_blocking_lock != NULL) {
struct lu_env env;
- rc = lu_env_init(&env, LCT_LOCAL);
- if (unlikely(rc != 0))
- CWARN("lu_env initialization failed with rc = %d,"
- "cannot start asynchronous commit\n", rc);
+ rc = lu_env_init(&env, LCT_LOCAL);
+ if (unlikely(rc != 0))
+ CWARN("%s: lu_env initialization failed, cannot "
+ "start asynchronous commit: rc = %d\n",
+ obd->obd_name, rc);
else
mdt_device_commit_async(&env, mdt);
lu_env_fini(&env);
lustre_cfg_bufs_set_string(bufs, 1, NULL);
lcfg = lustre_cfg_new(LCFG_PRE_CLEANUP, bufs);
if (!lcfg) {
- CERROR("%s:Cannot alloc lcfg!\n", mdt_obd_name(m));
+ CERROR("%s: cannot alloc lcfg\n", mdt_obd_name(m));
return;
}
top->ld_ops->ldo_process_config(env, top, lcfg);
LASSERT(exp);
class_export_get(exp);
- rc = server_disconnect_export(exp);
- if (rc != 0)
- CDEBUG(D_IOCTL, "server disconnect error: %d\n", rc);
+ rc = server_disconnect_export(exp);
+ if (rc != 0)
+ CDEBUG(D_IOCTL, "server disconnect error: rc = %d\n", rc);
- rc = mdt_export_cleanup(exp);
- class_export_put(exp);
- RETURN(rc);
+ rc = mdt_export_cleanup(exp);
+ class_export_put(exp);
+ RETURN(rc);
}
/* FIXME: Can we avoid using these two interfaces? */
if (rc < 0) {
mdt_object_put(info->mti_env, obj);
- CDEBUG(D_IOCTL, "nonlocal object "DFID": %d\n",
+ CDEBUG(D_IOCTL, "nonlocal object "DFID": rc = %d\n",
PFID(&fp->gf_fid), rc);
RETURN(rc);
}
key = req_capsule_client_get(tsi->tsi_pill, &RMF_GETINFO_KEY);
if (key == NULL) {
- CDEBUG(D_IOCTL, "No GETINFO key");
+ CDEBUG(D_IOCTL, "No GETINFO key\n");
RETURN(err_serious(-EFAULT));
}
keylen = req_capsule_get_size(tsi->tsi_pill, &RMF_GETINFO_KEY,
vallen = req_capsule_client_get(tsi->tsi_pill, &RMF_GETINFO_VALLEN);
if (vallen == NULL) {
- CDEBUG(D_IOCTL, "Unable to get RMF_GETINFO_VALLEN buffer");
+ CDEBUG(D_IOCTL, "%s: cannot get RMF_GETINFO_VALLEN buffer\n",
+ tgt_name(tsi->tsi_tgt));
RETURN(err_serious(-EFAULT));
}
valout = req_capsule_server_get(tsi->tsi_pill, &RMF_GETINFO_VAL);
if (valout == NULL) {
- CDEBUG(D_IOCTL, "Unable to get get-info RPC out buffer");
+ CDEBUG(D_IOCTL, "%s: cannot get get-info RPC out buffer\n",
+ tgt_name(tsi->tsi_tgt));
RETURN(err_serious(-EFAULT));
}
mdt->mdt_opts.mo_cos = !!val;
rc = lu_env_init(&env, LCT_LOCAL);
- if (unlikely(rc != 0)) {
- CWARN("lu_env initialization failed with rc = %d,"
- "cannot sync\n", rc);
- return;
- }
- mdt_device_sync(&env, mdt);
- lu_env_fini(&env);
+ if (unlikely(rc != 0)) {
+ CWARN("%s: lu_env initialization failed, cannot "
+ "sync: rc = %d\n", mdt_obd_name(mdt), rc);
+ return;
+ }
+ mdt_device_sync(&env, mdt);
+ lu_env_fini(&env);
}
/**
struct agent_action_iterator *aai = s->private;
ENTRY;
- LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X",
+ LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X\n",
aai->aai_magic);
aai->aai_ctxt = llog_get_context(mdt2obd_dev(aai->aai_mdt),
ENTRY;
aai = s->private;
- LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X",
+ LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X\n",
aai->aai_magic);
/* if rec already printed => skip */
int rc;
ENTRY;
- LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X",
+ LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X\n",
aai->aai_magic);
CDEBUG(D_HSM, "show from cat %d index %d eof=%d\n",
struct agent_action_iterator *aai = s->private;
ENTRY;
- LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X",
+ LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X\n",
aai->aai_magic);
if (aai->aai_ctxt)
if (remote) {
if (!uid_valid(make_kuid(&init_user_ns, req->rq_auth_mapped_uid))) {
CDEBUG(D_SEC, "remote user not mapped, deny access!\n");
- CDEBUG(D_SEC, "remote user not mapped, deny access!\n");
RETURN(-EACCES);
}
*ptr = 0;
}
else {
- CERROR("sptlrpc log name not correct: %s", seclogname);
+ CERROR("%s: sptlrpc log name not correct, %s: "
+ "rc = %d\n", obd->obd_name, seclogname, -EINVAL);
config_log_put(cld);
RETURN(-EINVAL);
}
result = atomic_read(&lock->cll_ref) > 0 &&
cl_lock_invariant_trusted(env, lock);
- if (!result && env != NULL)
- CL_LOCK_DEBUG(D_ERROR, env, lock, "invariant broken");
- return result;
+ if (!result && env != NULL)
+ CL_LOCK_DEBUG(D_ERROR, env, lock, "invariant broken\n");
+ return result;
}
/**
plain_counter = 0;
rc = llog_cat_reverse_process(env, llh, plain_print_cb, "foobar");
if (rc) {
- CERROR("5f: reversely process with plain_print_cb failed:"
+ CERROR("5f: reversely process with plain_print_cb failed: "
"%d\n", rc);
GOTO(out, rc);
}
NULL /* obd_connect_data */, NULL);
if (rc != -EALREADY) {
CERROR("6a: connect on connected MGC (%s) failed to return"
- " -EALREADY", mgc_obd->obd_name);
+ " -EALREADY\n", mgc_obd->obd_name);
if (rc == 0)
obd_disconnect(exp);
GOTO(ctxt_release, rc = -EINVAL);
static void job_stat_exit(cfs_hash_t *hs, cfs_hlist_node_t *hnode)
{
- CERROR("Should not have any items!");
+ CERROR("should not have any items\n");
}
static cfs_hash_ops_t job_stats_hash_ops = {
LPROCFS_WRITE_ENTRY();
proc = create_proc_entry(name, mode, root);
if (!proc) {
- CERROR("LprocFS: No memory to create /proc entry %s", name);
+ CERROR("LprocFS: No memory to create /proc entry %s\n",
+ name);
LPROCFS_WRITE_EXIT();
return ERR_PTR(-ENOMEM);
}
mode |= 0200;
proc = proc_create_data(name, mode, root, fops, data);
if (!proc) {
- CERROR("LprocFS: No memory to create /proc entry %s",
+ CERROR("LprocFS: No memory to create /proc entry %s\n",
name);
return ERR_PTR(-ENOMEM);
}
va_end(ap);
entry = proc_symlink(name, parent, dest);
- if (entry == NULL)
- CERROR("LprocFS: Could not create symbolic link from %s to %s",
- name, dest);
+ if (entry == NULL)
+ CERROR("LprocFS: Could not create symbolic link from "
+ "%s to %s\n", name, dest);
OBD_FREE(dest, MAX_STRING_SIZE + 1);
return entry;
OBD_FREE(pathcopy, pathsize);
if (cur_root == NULL || proc == NULL) {
- CERROR("LprocFS: No memory to create /proc entry %s",
- list->name);
- GOTO(out, rc = -ENOMEM);
+ CERROR("LprocFS: No memory to create /proc entry %s\n",
+ list->name);
+ GOTO(out, rc = -ENOMEM);
}
if (list->fops)
vsnprintf(key->lck_area + used,
ARRAY_SIZE(key->lck_area) - used, format, args);
if (complete) {
- if (cfs_cdebug_show(msgdata->msg_mask, msgdata->msg_subsys))
- libcfs_debug_msg(msgdata, "%s", key->lck_area);
+ if (cfs_cdebug_show(msgdata->msg_mask, msgdata->msg_subsys))
+ libcfs_debug_msg(msgdata, "%s\n", key->lck_area);
key->lck_area[0] = 0;
}
va_end(args);
if (rec->lrh_type == OBD_CFG_REC) {
class_config_parse_rec(rec, outstr, 256);
- LCONSOLE(D_WARNING, " %s", outstr);
+ LCONSOLE(D_WARNING, " %s\n", outstr);
} else {
LCONSOLE(D_WARNING, "unhandled lrh_type: %#x\n", rec->lrh_type);
rc = -EINVAL;
static void echo_put_object(struct echo_object *eco)
{
- if (cl_echo_object_put(eco))
- CERROR("echo client: drop an object failed");
+ int rc;
+
+ rc = cl_echo_object_put(eco);
+ if (rc)
+ CERROR("%s: echo client drop an object failed: rc = %d\n",
+ eco->eo_dev->ed_ec->ec_exp->exp_obd->obd_name, rc);
}
static void
else if (ext->oe_start > tmp->oe_end)
n = &(*n)->rb_right;
else
- EASSERTF(0, tmp, EXTSTR, EXTPARA(ext));
+ EASSERTF(0, tmp, EXTSTR"\n", EXTPARA(ext));
}
rb_link_node(&ext->oe_node, parent, n);
rb_insert_color(&ext->oe_node, &obj->oo_root);
/* grants has been allocated by caller */
LASSERTF(*grants >= chunksize + cli->cl_extent_tax,
"%u/%u/%u.\n", *grants, chunksize, cli->cl_extent_tax);
- LASSERTF((max_end - cur->oe_start) < max_pages, EXTSTR, EXTPARA(cur));
+ LASSERTF((max_end - cur->oe_start) < max_pages, EXTSTR"\n",
+ EXTPARA(cur));
restart:
osc_object_lock(obj);
/* if covering by different locks, no chance to match */
if (lock != ext->oe_osclock) {
EASSERTF(!overlapped(ext, cur), ext,
- EXTSTR, EXTPARA(cur));
+ EXTSTR"\n", EXTPARA(cur));
ext = next_extent(ext);
continue;
* full contain. */
EASSERTF((ext->oe_start <= cur->oe_start &&
ext->oe_end >= cur->oe_end),
- ext, EXTSTR, EXTPARA(cur));
+ ext, EXTSTR"\n", EXTPARA(cur));
if (ext->oe_state > OES_CACHE || ext->oe_fsync_wait) {
/* for simplicity, we wait for this extent to
if (clk->ols_locklessable && !(enqflags & CEF_DISCARD_DATA))
clk->ols_flags |= LDLM_FL_DENY_ON_CONTENTION;
- LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags "LPX64"\n",
+ LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags "LPX64,
lock, clk, clk->ols_flags);
result = 0;
ENTRY;
if (!try_module_get(THIS_MODULE)) {
- CERROR("Can't get module. Is it alive?");
+ CERROR("%s: cannot get module '%s'\n", obd->obd_name,
+ module_name(THIS_MODULE));
return -EINVAL;
}
switch (cmd) {
LINVRNT(osd_invariant(obj));
LASSERT(obj->oo_inode == NULL);
- LASSERTF(fid_is_sane(fid) || fid_is_idif(fid), DFID, PFID(fid));
+ LASSERTF(fid_is_sane(fid) || fid_is_idif(fid), DFID"\n", PFID(fid));
dev = osd_dev(ldev);
scrub = &dev->od_scrub;
rc = ll_vfs_dq_transfer(inode, &iattr);
if (rc) {
CERROR("%s: quota transfer failed: rc = %d. Is quota "
- "enforcement enabled on the ldiskfs filesystem?",
- inode->i_sb->s_id, rc);
+ "enforcement enabled on the ldiskfs "
+ "filesystem?\n", inode->i_sb->s_id, rc);
return rc;
}
}
* should not happen since quota enforcement is no longer
* enabled on ldiskfs (lquota takes care of it).
*/
- LASSERTF(result == 0, "%d", result);
+ LASSERTF(result == 0, "%d\n", result);
ll_dirty_inode(inode, I_DIRTY_DATASYNC);
}
if (osd_object_auth(env, dt, capa, CAPA_OPC_INDEX_INSERT))
RETURN(-EACCES);
- LASSERTF(fid_is_sane(fid), "fid"DFID" is insane!", PFID(fid));
+ LASSERTF(fid_is_sane(fid), "fid"DFID" is insane!\n", PFID(fid));
rc = osd_remote_fid(env, osd, fid);
if (rc < 0) {
struct inode *obj;
obj = iam_leaf_container(l)->ic_object;
- CERROR("Wrong magic in node %llu (#%lu): %#x != %#x or "
- "wrong used: %d",
- (unsigned long long)l->il_bh->b_blocknr, obj->i_ino,
+ CERROR("Wrong magic in node %llu (#%lu): %#x != %#x or "
+ "wrong used: %d\n",
+ (unsigned long long)l->il_bh->b_blocknr, obj->i_ino,
le16_to_cpu(head->vlh_magic), IAM_LVAR_LEAF_MAGIC,
- used);
- result = -EIO;
+ used);
+ result = -EIO;
}
return result;
}
err);
break;
}
- LASSERTF(boffs + size <= bh->b_size,
- "boffs %d size %d bh->b_size %lu",
- boffs, size, (unsigned long)bh->b_size);
+ LASSERTF(boffs + size <= bh->b_size,
+ "boffs %d size %d bh->b_size %lu\n",
+ boffs, size, (unsigned long)bh->b_size);
memcpy(bh->b_data + boffs, buf, size);
err = ldiskfs_journal_dirty_metadata(handle, bh);
if (err)
LASSERT(d->opd_dt_dev.dd_ops == &osp_dt_ops);
if (!try_module_get(THIS_MODULE)) {
- CERROR("%s: can't get module. Is it alive?", obd->obd_name);
+ CERROR("%s: cannot get module '%s'\n", obd->obd_name,
+ module_name(THIS_MODULE));
return -EINVAL;
}
request = ptlrpc_request_cache_alloc(GFP_NOFS);
if (request) {
- LASSERTF((unsigned long)imp > 0x1000, "%p", imp);
+ LASSERTF((unsigned long)imp > 0x1000, "%p\n", imp);
LASSERT(imp != LP_POISON);
- LASSERTF((unsigned long)imp->imp_client > 0x1000, "%p",
+ LASSERTF((unsigned long)imp->imp_client > 0x1000, "%p\n",
imp->imp_client);
LASSERT(imp->imp_client != LP_POISON);
LASSERT(req->rq_set == NULL);
LASSERT(!req->rq_receiving_reply);
- set = ptlrpc_prep_set();
- if (set == NULL) {
- CERROR("Unable to allocate ptlrpc set.");
- RETURN(-ENOMEM);
- }
+ set = ptlrpc_prep_set();
+ if (set == NULL) {
+ CERROR("cannot allocate ptlrpc set: rc = %d\n", -ENOMEM);
+ RETURN(-ENOMEM);
+ }
/* for distributed debugging */
lustre_msg_set_status(req->rq_reqmsg, current_pid());
if (svcpt->scp_service->srv_max_reply_size <
msglen + sizeof(struct ptlrpc_reply_state)) {
/* Just return failure if the size is too big */
- CERROR("size of message is too big (%zd), %d allowed",
+ CERROR("size of message is too big (%zd), %d allowed\n",
msglen + sizeof(struct ptlrpc_reply_state),
svcpt->scp_service->srv_max_reply_size);
RETURN(-ENOMEM);
* in case of privacy mode, nob_transferred needs to be adjusted.
*/
if (desc->bd_nob != desc->bd_nob_transferred) {
- CERROR("nob %d doesn't match transferred nob %d",
- desc->bd_nob, desc->bd_nob_transferred);
- return -EPROTO;
- }
+ CERROR("nob %d doesn't match transferred nob %d\n",
+ desc->bd_nob, desc->bd_nob_transferred);
+ return -EPROTO;
+ }
- return 0;
+ return 0;
}
EXPORT_SYMBOL(sptlrpc_cli_unwrap_bulk_write);
rc = dt_insert(env, obj, (struct dt_rec *)&qti->qti_rec,
key, th, BYPASS_CAPA, 1);
LASSERTF(rc == 0, "failed to insert record in quota "
- "index "DFID,
+ "index "DFID"\n",
PFID(lu_object_fid(&obj->do_lu)));
GOTO(out, rc);
}
qsd->qsd_acct_failed)
RETURN(0);
- LASSERTF(trans->lqt_id_cnt <= QUOTA_MAX_TRANSIDS, "id_cnt=%d",
+ LASSERTF(trans->lqt_id_cnt <= QUOTA_MAX_TRANSIDS, "id_cnt=%d\n",
trans->lqt_id_cnt);
/* check whether we already allocated a slot for this id */
for (i = 0; i < trans->lqt_id_cnt; i++) {
break;
}
default:
- LASSERTF(0, "invalid flags for blocking ast %d", flag);
+ LASSERTF(0, "invalid flags for blocking ast %d\n", flag);
}
RETURN(rc);
break;
}
default:
- LASSERTF(0, "invalid flags for blocking ast %d", flag);
+ LASSERTF(0, "invalid flags for blocking ast %d\n", flag);
}
RETURN(rc);
qti->qti_einfo.ei_cbdata = arg;
break;
default:
- LASSERTF(0, "invalid it_op %d", it_op);
+ LASSERTF(0, "invalid it_op %d\n", it_op);
}
/* build lock enqueue request */
OBD_SLAB_ALLOC_PTR_GFP(upd, upd_kmem, GFP_NOFS);
if (upd == NULL) {
- CERROR("Failed to allocate upd");
return NULL;
}
rc = lu_env_init(env, LCT_DT_THREAD);
if (rc) {
- CERROR("%s: Fail to init env.", qsd->qsd_svname);
+ CERROR("%s: cannot init env: rc = %d\n", qsd->qsd_svname, rc);
OBD_FREE_PTR(env);
RETURN(rc);
}
task = kthread_run(qsd_upd_thread, (void *)qsd,
"lquota_wb_%s", qsd->qsd_svname);
if (IS_ERR(task)) {
- CERROR("Fail to start quota update thread. rc: %ld\n",
+ CERROR("fail to start quota update thread: rc = %ld\n",
PTR_ERR(task));
thread_set_flags(thread, SVC_STOPPED);
RETURN(PTR_ERR(task));
flags[flag_cnt++] = force;
} else if (strcmp(argv[n], "failover") == 0) {
flags[flag_cnt++] = failover;
- } else {
- fprintf(stderr, "unknown option: %s", argv[n]);
- return CMD_HELP;
- }
- }
+ } else {
+ fprintf(stderr, "unknown option: %s\n", argv[n]);
+ return CMD_HELP;
+ }
+ }
if (flag_cnt) {
lustre_cfg_bufs_set_string(&bufs, 1, flags);