提交 09561a53 编写于 作者: A Al Viro

lustre: use %p[dD]

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 74d01958
......@@ -151,10 +151,10 @@ static int ll_ddelete(const struct dentry *de)
{
LASSERT(de);
CDEBUG(D_DENTRY, "%s dentry %.*s (%p, parent %p, inode %p) %s%s\n",
CDEBUG(D_DENTRY, "%s dentry %pd (%p, parent %p, inode %p) %s%s\n",
d_lustre_invalid((struct dentry *)de) ? "deleting" : "keeping",
de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode,
d_unhashed((struct dentry *)de) ? "" : "hashed,",
de, de, de->d_parent, de->d_inode,
d_unhashed(de) ? "" : "hashed,",
list_empty(&de->d_subdirs) ? "" : "subdirs");
/* kernel >= 2.6.38 last refcount is decreased after this function. */
......@@ -180,8 +180,8 @@ int ll_d_init(struct dentry *de)
{
LASSERT(de != NULL);
CDEBUG(D_DENTRY, "ldd on dentry %.*s (%p) parent %p inode %p refc %d\n",
de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode,
CDEBUG(D_DENTRY, "ldd on dentry %pd (%p) parent %p inode %p refc %d\n",
de, de, de->d_parent, de->d_inode,
d_count(de));
if (de->d_fsdata == NULL) {
......@@ -259,9 +259,8 @@ void ll_invalidate_aliases(struct inode *inode)
ll_lock_dcache(inode);
ll_d_hlist_for_each_entry(dentry, p, &inode->i_dentry, d_u.d_alias) {
CDEBUG(D_DENTRY, "dentry in drop %.*s (%p) parent %p "
"inode %p flags %d\n", dentry->d_name.len,
dentry->d_name.name, dentry, dentry->d_parent,
CDEBUG(D_DENTRY, "dentry in drop %pd (%p) parent %p "
"inode %p flags %d\n", dentry, dentry, dentry->d_parent,
dentry->d_inode, dentry->d_flags);
if (unlikely(dentry == dentry->d_sb->s_root)) {
......@@ -352,8 +351,8 @@ static int ll_revalidate_nd(struct dentry *dentry, unsigned int flags)
{
int rc;
CDEBUG(D_VFSTRACE, "VFS Op:name=%s, flags=%u\n",
dentry->d_name.name, flags);
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, flags=%u\n",
dentry, flags);
rc = ll_revalidate_dentry(dentry, flags);
return rc;
......
......@@ -1166,9 +1166,9 @@ ll_file_io_generic(const struct lu_env *env, struct vvp_io_args *args,
/* If any bit been read/written (result != 0), we just return
* short read/write instead of restart io. */
if ((result == 0 || result == -ENODATA) && io->ci_need_restart) {
CDEBUG(D_VFSTRACE, "Restart %s on %s from %lld, count:%zd\n",
CDEBUG(D_VFSTRACE, "Restart %s on %pD from %lld, count:%zd\n",
iot == CIT_READ ? "read" : "write",
file->f_dentry->d_name.name, *ppos, count);
file, *ppos, count);
LASSERTF(io->ci_nob == 0, "%zd", io->ci_nob);
goto restart;
}
......@@ -2899,8 +2899,8 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
LASSERT(inode != NULL);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),name=%s\n",
inode->i_ino, inode->i_generation, inode, dentry->d_name.name);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),name=%pd\n",
inode->i_ino, inode->i_generation, inode, dentry);
exp = ll_i2mdexp(inode);
......
......@@ -1489,8 +1489,8 @@ static inline void __d_lustre_invalidate(struct dentry *dentry)
*/
static inline void d_lustre_invalidate(struct dentry *dentry, int nested)
{
CDEBUG(D_DENTRY, "invalidate dentry %.*s (%p) parent %p inode %p "
"refc %d\n", dentry->d_name.len, dentry->d_name.name, dentry,
CDEBUG(D_DENTRY, "invalidate dentry %pd (%p) parent %p inode %p "
"refc %d\n", dentry, dentry,
dentry->d_parent, dentry->d_inode, d_count(dentry));
spin_lock_nested(&dentry->d_lock,
......
......@@ -698,10 +698,8 @@ void lustre_dump_dentry(struct dentry *dentry, int recur)
list_for_each(tmp, &dentry->d_subdirs)
subdirs++;
CERROR("dentry %p dump: name=%.*s parent=%.*s (%p), inode=%p, count=%u,"
" flags=0x%x, fsdata=%p, %d subdirs\n", dentry,
dentry->d_name.len, dentry->d_name.name,
dentry->d_parent->d_name.len, dentry->d_parent->d_name.name,
CERROR("dentry %p dump: name=%pd parent=%p, inode=%p, count=%u,"
" flags=0x%x, fsdata=%p, %d subdirs\n", dentry, dentry,
dentry->d_parent, dentry->d_inode, d_count(dentry),
dentry->d_flags, dentry->d_fsdata, subdirs);
if (dentry->d_inode != NULL)
......
......@@ -509,8 +509,8 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
if (dentry->d_name.len > ll_i2sbi(parent)->ll_namelen)
return ERR_PTR(-ENAMETOOLONG);
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),intent=%s\n",
dentry->d_name.len, dentry->d_name.name, parent->i_ino,
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p),intent=%s\n",
dentry, parent->i_ino,
parent->i_generation, parent, LL_IT2STR(it));
if (d_mountpoint(dentry))
......@@ -586,8 +586,8 @@ static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry,
struct lookup_intent *itp, it = { .it_op = IT_GETATTR };
struct dentry *de;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),flags=%u\n",
dentry->d_name.len, dentry->d_name.name, parent->i_ino,
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p),flags=%u\n",
dentry, parent->i_ino,
parent->i_generation, parent, flags);
/* Optimize away (CREATE && !OPEN). Let .create handle the race. */
......@@ -619,9 +619,9 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,
long long lookup_flags = LOOKUP_OPEN;
int rc = 0;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),file %p,"
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p),file %p,"
"open_flags %x,mode %x opened %d\n",
dentry->d_name.len, dentry->d_name.name, dir->i_ino,
dentry, dir->i_ino,
dir->i_generation, dir, file, open_flags, mode, *opened);
it = kzalloc(sizeof(*it), GFP_NOFS);
......@@ -741,8 +741,8 @@ static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode,
struct inode *inode;
int rc = 0;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),intent=%s\n",
dentry->d_name.len, dentry->d_name.name, dir->i_ino,
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p),intent=%s\n",
dentry, dir->i_ino,
dir->i_generation, dir, LL_IT2STR(it));
rc = it_open_error(DISP_OPEN_CREATE, it);
......@@ -863,17 +863,17 @@ static int ll_create_nd(struct inode *dir, struct dentry *dentry,
{
int rc;
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),"
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p),"
"flags=%u, excl=%d\n",
dentry->d_name.len, dentry->d_name.name, dir->i_ino,
dentry, dir->i_ino,
dir->i_generation, dir, mode, want_excl);
rc = ll_mknod_generic(dir, &dentry->d_name, mode, 0, dentry);
ll_stats_ops_tally(ll_i2sbi(dir), LPROC_LL_CREATE, 1);
CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s, unhashed %d\n",
dentry->d_name.len, dentry->d_name.name, d_unhashed(dentry));
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, unhashed %d\n",
dentry, d_unhashed(dentry));
return rc;
}
......
......@@ -969,8 +969,8 @@ static int ll_agl_thread(void *arg)
struct l_wait_info lwi = { 0 };
thread->t_pid = current_pid();
CDEBUG(D_READA, "agl thread started: sai %p, parent %.*s\n",
sai, parent->d_name.len, parent->d_name.name);
CDEBUG(D_READA, "agl thread started: sai %p, parent %pd\n",
sai, parent);
atomic_inc(&sbi->ll_agl_total);
spin_lock(&plli->lli_agl_lock);
......@@ -1019,8 +1019,8 @@ static int ll_agl_thread(void *arg)
spin_unlock(&plli->lli_agl_lock);
wake_up(&thread->t_ctl_waitq);
ll_sai_put(sai);
CDEBUG(D_READA, "agl thread stopped: sai %p, parent %.*s\n",
sai, parent->d_name.len, parent->d_name.name);
CDEBUG(D_READA, "agl thread stopped: sai %p, parent %pd\n",
sai, parent);
return 0;
}
......@@ -1031,8 +1031,8 @@ static void ll_start_agl(struct dentry *parent, struct ll_statahead_info *sai)
struct ll_inode_info *plli;
struct task_struct *task;
CDEBUG(D_READA, "start agl thread: sai %p, parent %.*s\n",
sai, parent->d_name.len, parent->d_name.name);
CDEBUG(D_READA, "start agl thread: sai %p, parent %pd\n",
sai, parent);
plli = ll_i2info(parent->d_inode);
task = kthread_run(ll_agl_thread, parent,
......@@ -1066,8 +1066,8 @@ static int ll_statahead_thread(void *arg)
struct l_wait_info lwi = { 0 };
thread->t_pid = current_pid();
CDEBUG(D_READA, "statahead thread starting: sai %p, parent %.*s\n",
sai, parent->d_name.len, parent->d_name.name);
CDEBUG(D_READA, "statahead thread starting: sai %p, parent %pd\n",
sai, parent);
if (sbi->ll_flags & LL_SBI_AGL_ENABLED)
ll_start_agl(parent, sai);
......@@ -1288,8 +1288,8 @@ static int ll_statahead_thread(void *arg)
wake_up(&thread->t_ctl_waitq);
ll_sai_put(sai);
dput(parent);
CDEBUG(D_READA, "statahead thread stopped: sai %p, parent %.*s\n",
sai, parent->d_name.len, parent->d_name.name);
CDEBUG(D_READA, "statahead thread stopped: sai %p, parent %pd\n",
sai, parent);
return rc;
}
......@@ -1612,10 +1612,9 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp,
} else if ((*dentryp)->d_inode != inode) {
/* revalidate, but inode is recreated */
CDEBUG(D_READA,
"stale dentry %.*s inode %lu/%u, "
"stale dentry %pd inode %lu/%u, "
"statahead inode %lu/%u\n",
(*dentryp)->d_name.len,
(*dentryp)->d_name.name,
*dentryp,
(*dentryp)->d_inode->i_ino,
(*dentryp)->d_inode->i_generation,
inode->i_ino,
......@@ -1666,9 +1665,9 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp,
if (unlikely(sai->sai_inode != parent->d_inode)) {
struct ll_inode_info *nlli = ll_i2info(parent->d_inode);
CWARN("Race condition, someone changed %.*s just now: "
CWARN("Race condition, someone changed %pd just now: "
"old parent "DFID", new parent "DFID"\n",
(*dentryp)->d_name.len, (*dentryp)->d_name.name,
*dentryp,
PFID(&lli->lli_fid), PFID(&nlli->lli_fid));
dput(parent);
iput(sai->sai_inode);
......@@ -1676,8 +1675,8 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp,
goto out;
}
CDEBUG(D_READA, "start statahead thread: sai %p, parent %.*s\n",
sai, parent->d_name.len, parent->d_name.name);
CDEBUG(D_READA, "start statahead thread: sai %p, parent %pd\n",
sai, parent);
/* The sai buffer already has one reference taken at allocation time,
* but as soon as we expose the sai by attaching it to the lli that
......
......@@ -516,8 +516,8 @@ ssize_t ll_getxattr(struct dentry *dentry, const char *name,
}
if (size < lmmsize) {
CERROR("server bug: replied size %d > %d for %s (%s)\n",
lmmsize, (int)size, dentry->d_name.name, name);
CERROR("server bug: replied size %d > %d for %pd (%s)\n",
lmmsize, (int)size, dentry, name);
rc = -ERANGE;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册