max_nob = CFS_PAGE_SIZE - tage->used - known_size;
if (max_nob <= 0) {
- printk(CFS_KERN_EMERG "negative max_nob: %i\n",
+ printk(CFS_KERN_EMERG "negative max_nob: %d\n",
max_nob);
mask |= D_ERROR;
cfs_trace_put_tcd(tcd);
struct mdc_device *mc = lu2mdc_dev(ld);
LASSERTF(cfs_atomic_read(&ld->ld_ref) == 0,
- "Refcount = %i\n", cfs_atomic_read(&ld->ld_ref));
+ "Refcount = %d\n", cfs_atomic_read(&ld->ld_ref));
LASSERT(cfs_list_empty(&mc->mc_linkage));
md_device_fini(&mc->mc_md_dev);
OBD_FREE_PTR(mc);
cl_inode_atime(inode) = attr->cat_atime;
cl_inode_ctime(inode) = attr->cat_ctime;
} else {
- CL_LOCK_DEBUG(D_INFO, env, lock, "attr_get: %i\n", rc);
+ CL_LOCK_DEBUG(D_INFO, env, lock, "attr_get: %d\n", rc);
}
cl_object_attr_unlock(obj);
cl_isize_unlock(inode, 0);
CLOBINVRNT(env, obj, ccc_object_invariant(obj));
ENTRY;
- CDEBUG(D_VFSTRACE, "lock: %i [%lu, %lu]\n", mode, start, end);
+ CDEBUG(D_VFSTRACE, "lock: %d [%lu, %lu]\n", mode, start, end);
memset(&cio->cui_link, 0, sizeof cio->cui_link);
if (((int)error) < 0) /* cast to signed type */
result = error; /* as ldlm_error_t can be unsigned */
else {
- CERROR("Invalid DLM result code: %i\n", error);
+ CERROR("Invalid DLM result code: %d\n", error);
result = -EPROTO;
}
}
vma->vm_flags &= ~VM_SEQ_READ;
vma->vm_flags |= VM_RAND_READ;
- CDEBUG(D_INFO, "vm_flags: %lx (%lu %i %i)\n", vma->vm_flags,
+ CDEBUG(D_INFO, "vm_flags: %lx (%lu %d %d)\n", vma->vm_flags,
fio->ft_index, fio->ft_writable, fio->ft_executable);
if (cl_io_init(env, io, CIT_FAULT, io->ci_obj) == 0) {
lcc = ERR_PTR(result);
}
- CDEBUG(D_VFSTRACE, "%lu@"DFID" -> %i %p %p\n",
+ CDEBUG(D_VFSTRACE, "%lu@"DFID" -> %d %p %p\n",
vmpage->index, PFID(lu_object_fid(&clob->co_lu)), result,
env, io);
return lcc;
descr->cld_enq_flags = flags;
result = cl_io_lock_alloc_add(env, io, descr);
- CDEBUG(D_VFSTRACE, "lock: %i: [%lu, %lu]\n",
+ CDEBUG(D_VFSTRACE, "lock: %d: [%lu, %lu]\n",
descr->cld_mode, descr->cld_start,
descr->cld_end);
/* Sanity check whether the page is protected by a lock. */
rc = cl_page_is_under_lock(env, io, page);
if (rc != -EBUSY) {
- CL_PAGE_HEADER(D_WARNING, env, page, "%s: %i\n",
+ CL_PAGE_HEADER(D_WARNING, env, page, "%s: %d\n",
rc == -ENODATA ? "without a lock" :
"match failed", rc);
if (rc != -ENODATA)
struct inode *inode = obj->cob_inode;
struct ll_inode_info *lli;
- (*p)(env, cookie, "(%s %i %i) inode: %p ",
+ (*p)(env, cookie, "(%s %d %d) inode: %p ",
cfs_list_empty(&obj->cob_pending_list) ? "-" : "+",
obj->cob_transient_pages, cfs_atomic_read(&obj->cob_mmap_cnt),
inode);
if (inode) {
lli = ll_i2info(inode);
- (*p)(env, cookie, "%lu/%u %o %u %i %p "DFID,
+ (*p)(env, cookie, "%lu/%u %o %u %d %p "DFID,
inode->i_ino, inode->i_generation, inode->i_mode,
inode->i_nlink, atomic_read(&inode->i_count),
lli->lli_clob, PFID(&lli->lli_fid));
start, end);
rc = cl_io_iter_init(sub->sub_env, sub->sub_io);
lov_sub_put(sub);
- CDEBUG(D_VFSTRACE, "shrink: %i ["LPU64", "LPU64")\n",
+ CDEBUG(D_VFSTRACE, "shrink: %d ["LPU64", "LPU64")\n",
stripe, start, end);
} else
rc = PTR_ERR(sub);
* match against original lock extent.
*/
result = cl_lock_ext_match(&lov->lls_orig, need);
- CDEBUG(D_DLMTRACE, DDESCR"/"DDESCR" %i %i/%i: %i\n",
+ CDEBUG(D_DLMTRACE, DDESCR"/"DDESCR" %d %d/%d: %d\n",
PDESCR(&lov->lls_orig), PDESCR(&lov->lls_sub[0].sub_got),
lov->lls_sub[0].sub_stripe, lov->lls_nr, lov_r0(obj)->lo_nr,
result);
numcookies - cookies);
llog_ctxt_put(cctxt);
if (rc < 0) {
- CERROR("Can't add llog (rc = %d) for stripe %i\n",
+ CERROR("Can't add llog (rc = %d) for stripe %d\n",
rc, cookies);
memset(logcookies + cookies, 0,
sizeof(struct llog_cookie));
r0->lo_sub[idx]->lso_index = idx;
result = 0;
} else {
- CERROR("Stripe is already owned by other file (%i).\n", idx);
+ CERROR("Stripe is already owned by other file (%d).\n", idx);
LU_OBJECT_DEBUG(D_ERROR, env, &stripe->co_lu, "\n");
LU_OBJECT_DEBUG(D_ERROR, env, lu_object_top(&parent->coh_lu),
"old\n");
case CLS_HELD:
CL_LOCK_DEBUG(D_ERROR, env, parent, "Delete CLS_HELD lock\n");
default:
- CERROR("Impossible state: %i\n", parent->cll_state);
+ CERROR("Impossible state: %d\n", parent->cll_state);
LBUG();
break;
}
{
struct lovsub_object *los = lu2lovsub(obj);
- return (*p)(env, cookie, "[%i]", los->lso_index);
+ return (*p)(env, cookie, "[%d]", los->lso_index);
}
static int lovsub_attr_set(const struct lu_env *env, struct cl_object *obj,
cfs_spin_lock(&mdt->mdt_lut.lut_translock);
if (txn->th_result != 0) {
if (mti->mti_transno != 0) {
- CERROR("Replay transno "LPU64" failed: rc %i\n",
+ CERROR("Replay transno "LPU64" failed: rc %d\n",
mti->mti_transno, txn->th_result);
}
} else if (mti->mti_transno == 0) {
if (cl_lock_descr_cmp(&scan->cill_descr, need))
continue;
cl_lock_descr_merge(&scan->cill_descr, need);
- CDEBUG(D_VFSTRACE, "lock: %i: [%lu, %lu]\n",
+ CDEBUG(D_VFSTRACE, "lock: %d: [%lu, %lu]\n",
scan->cill_descr.cld_mode, scan->cill_descr.cld_start,
scan->cill_descr.cld_end);
RETURN(+1);
const char *func, const int line)
{
struct cl_object_header *h = cl_object_header(lock->cll_descr.cld_obj);
- CDEBUG(level, "%s: %p@(%i %p %i %d %d %d %d %lx)"
- "(%p/%d/%i) at %s():%d\n",
+ CDEBUG(level, "%s: %p@(%d %p %d %d %d %d %d %lx)"
+ "(%p/%d/%d) at %s():%d\n",
prefix, lock, cfs_atomic_read(&lock->cll_ref),
lock->cll_guarder, lock->cll_depth,
lock->cll_state, lock->cll_error, lock->cll_holds,
lock->cll_error == 0 &&
!(lock->cll_flags & CLF_CANCELLED) &&
cl_lock_fits_into(env, lock, need, io);
- CDEBUG(D_DLMTRACE, "has: "DDESCR"(%i) need: "DDESCR": %d\n",
+ CDEBUG(D_DLMTRACE, "has: "DDESCR"(%d) need: "DDESCR": %d\n",
PDESCR(&lock->cll_descr), lock->cll_state, PDESCR(need),
matched);
if (matched) {
env = &cle->ce_lu;
*refcheck = ++cle->ce_ref;
}
- CDEBUG(D_OTHER, "%i@%p\n", cle ? cle->ce_ref : 0, cle);
+ CDEBUG(D_OTHER, "%d@%p\n", cle ? cle->ce_ref : 0, cle);
return env;
}
EXPORT_SYMBOL(cl_env_peek);
cle = cl_env_container(env);
cl_env_attach(cle);
*refcheck = cle->ce_ref;
- CDEBUG(D_OTHER, "%i@%p\n", cle->ce_ref, cle);
+ CDEBUG(D_OTHER, "%d@%p\n", cle->ce_ref, cle);
}
}
return env;
cle = cl_env_container(env);
*refcheck = cle->ce_ref;
- CDEBUG(D_OTHER, "%i@%p\n", cle->ce_ref, cle);
+ CDEBUG(D_OTHER, "%d@%p\n", cle->ce_ref, cle);
}
return env;
}
LASSERT(cle->ce_ref > 0);
LASSERT(ergo(refcheck != NULL, cle->ce_ref == *refcheck));
- CDEBUG(D_OTHER, "%i@%p\n", cle->ce_ref, cle);
+ CDEBUG(D_OTHER, "%d@%p\n", cle->ce_ref, cle);
if (--cle->ce_ref == 0) {
CL_ENV_DEC(cs_busy);
cl_env_detach(cle);
cl_env_attach(cle);
cl_env_get(refcheck);
- CDEBUG(D_OTHER, "%i@%p\n", cle->ce_ref, cle);
+ CDEBUG(D_OTHER, "%d@%p\n", cle->ce_ref, cle);
}
EXPORT_SYMBOL(cl_env_implant);
LASSERT(cle->ce_ref > 1);
- CDEBUG(D_OTHER, "%i@%p\n", cle->ce_ref, cle);
+ CDEBUG(D_OTHER, "%d@%p\n", cle->ce_ref, cle);
cl_env_detach(cle);
cl_env_put(env, refcheck);
hdr = cl_object_header(o);
cfs_atomic_inc(&site->cs_pages.cs_lookup);
- CDEBUG(D_PAGE, "%lu@"DFID" %p %lu %i\n",
+ CDEBUG(D_PAGE, "%lu@"DFID" %p %lu %d\n",
idx, PFID(&hdr->coh_lu.loh_fid), vmpage, vmpage->private, type);
/* fast path. */
if (type == CPT_CACHEABLE) {
ENTRY;
old = page->cp_state;
PASSERT(env, page, allowed_transitions[old][state]);
- CL_PAGE_HEADER(D_TRACE, env, page, "%i -> %i\n", old, state);
+ CL_PAGE_HEADER(D_TRACE, env, page, "%d -> %d\n", old, state);
for (; page != NULL; page = page->cp_child) {
PASSERT(env, page, page->cp_state == old);
PASSERT(env, page,
PASSERT(env, page, cfs_atomic_read(&page->cp_ref) > !!page->cp_parent);
ENTRY;
- CL_PAGE_HEADER(D_TRACE, env, page, "%i\n",
+ CL_PAGE_HEADER(D_TRACE, env, page, "%d\n",
cfs_atomic_read(&page->cp_ref));
hdr = cl_object_header(cl_object_top(page->cp_obj));
KLASSERT(ergo(crt == CRT_WRITE && pg->cp_type == CPT_CACHEABLE,
equi(result == 0,
PageWriteback(cl_page_vmpage(env, pg)))));
- CL_PAGE_HEADER(D_TRACE, env, pg, "%i %i\n", crt, result);
+ CL_PAGE_HEADER(D_TRACE, env, pg, "%d %d\n", crt, result);
return result;
}
EXPORT_SYMBOL(cl_page_prep);
PINVRNT(env, pg, cl_page_invariant(pg));
ENTRY;
- CL_PAGE_HEADER(D_TRACE, env, pg, "%i %i\n", crt, ioret);
+ CL_PAGE_HEADER(D_TRACE, env, pg, "%d %d\n", crt, ioret);
if (crt == CRT_READ && ioret == 0) {
PASSERT(env, pg, !(pg->cp_flags & CPF_READ_COMPLETED));
pg->cp_flags |= CPF_READ_COMPLETED;
PASSERT(env, pg, pg->cp_state == CPS_CACHED);
cl_page_io_start(env, pg, crt);
}
- CL_PAGE_HEADER(D_TRACE, env, pg, "%i %i\n", crt, result);
+ CL_PAGE_HEADER(D_TRACE, env, pg, "%d %d\n", crt, result);
RETURN(result);
}
EXPORT_SYMBOL(cl_page_make_ready);
cl_page_owner_clear(pg);
cl_page_state_set(env, pg, CPS_CACHED);
}
- CL_PAGE_HEADER(D_TRACE, env, pg, "%i %i\n", crt, result);
+ CL_PAGE_HEADER(D_TRACE, env, pg, "%d %d\n", crt, result);
RETURN(result);
}
EXPORT_SYMBOL(cl_page_cache_add);
{
PINVRNT(env, pg, cl_page_invariant(pg));
- CL_PAGE_HEADER(D_TRACE, env, pg, "%i %i\n", from, to);
+ CL_PAGE_HEADER(D_TRACE, env, pg, "%d %d\n", from, to);
CL_PAGE_INVOID(env, pg, CL_PAGE_OP(cpo_clip),
(const struct lu_env *,
const struct cl_page_slice *,int, int),
key = lu_keys[i];
if (key != NULL) {
- CERROR("[%i]: %p %x (%p,%p,%p) %i %i \"%s\"@%p\n",
+ CERROR("[%d]: %p %x (%p,%p,%p) %d %d \"%s\"@%p\n",
i, key, key->lct_tags,
key->lct_init, key->lct_fini, key->lct_exit,
key->lct_index, cfs_atomic_read(&key->lct_used),
++iterations;
if (lu_ref_link_eq(link, scope, source)) {
if (iterations > lu_ref_chain_max_length) {
- CWARN("Long lu_ref chain %i \"%s\":%p\n",
+ CWARN("Long lu_ref chain %d \"%s\":%p\n",
iterations, scope, source);
lu_ref_chain_max_length = iterations * 3 / 2;
}
LASSERT(qin->pl_nr > 0);
- CDEBUG(D_INFO, "%i %i\n", qin->pl_nr, crt);
+ CDEBUG(D_INFO, "%d %d\n", qin->pl_nr, crt);
/*
* NOTE: here @page is a top-level page. This is done to avoid
* creation of sub-page-list.
if (queued > 0)
osc_io_unplug(env, osc, cli);
- CDEBUG(D_INFO, "%i/%i %i\n", qin->pl_nr, qout->pl_nr, result);
+ CDEBUG(D_INFO, "%d/%d %d\n", qin->pl_nr, qout->pl_nr, result);
return qout->pl_nr > 0 ? 0 : result;
}
io = ios->cis_io;
fio = &io->u.ci_fault;
- CDEBUG(D_INFO, "%lu %i %i\n",
+ CDEBUG(D_INFO, "%lu %d %d\n",
fio->ft_index, fio->ft_writable, fio->ft_nob);
/*
* If mapping is writeable, adjust kms to cover this page,
/*
* XXX Linux specific debugging stuff.
*/
- CL_PAGE_DEBUG(D_ERROR, env, page, "%s/%i %lu\n",
+ CL_PAGE_DEBUG(D_ERROR, env, page, "%s/%d %lu\n",
submitter->comm, submitter->pid, start);
libcfs_debug_dumpstack(submitter);
}
} else if (olck->ols_state == OLS_CANCELLED) {
rc = -EIO;
} else {
- CERROR("Impossible state: %i\n", olck->ols_state);
+ CERROR("Impossible state: %d\n", olck->ols_state);
LBUG();
}
if (rc) {
count2 = count - count1;
dx_get_ikey(path, iam_entry_shift(path, entries, count1), pivot);
- dxtrace(printk("Split index %i/%i\n", count1, count2));
+ dxtrace(printk("Split index %d/%d\n", count1, count2));
memcpy((char *) iam_entry_shift(path, entries2, delta),
(char *) iam_entry_shift(path, entries, count1),
obj = iam_leaf_container(l)->ic_object;
CERROR("Wrong magic in node %llu (#%lu): %#x != %#x or "
- "wrong count: %i (%i)\n",
+ "wrong count: %d (%d)\n",
(unsigned long long)l->il_bh->b_blocknr, obj->i_ino,
ill->ill_magic, le16_to_cpu(IAM_LEAF_HEADER_MAGIC),
count, leaf_count_limit(l));
obj = iam_leaf_container(l)->ic_object;
CERROR("Wrong magic in node %llu (#%lu): %#x != %#x or "
- "wrong used: %i",
+ "wrong used: %d",
(unsigned long long)l->il_bh->b_blocknr, obj->i_ino,
head->vlh_magic, le16_to_cpu(IAM_LVAR_LEAF_MAGIC),
used);
rc = lu_env_init(&env, LCT_DT_THREAD);
if (rc) {
- CERROR("Can't initialize environment rc=%i\n", rc);
+ CERROR("Can't initialize environment rc=%d\n", rc);
return;
}