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