Commit 97a075cd authored by James Nunez's avatar James Nunez Committed by Greg Kroah-Hartman

staging: lustre: llite: Replace printing of i_ino with ll_inode2fid()

The printing of i_ino/i_generation in llite messages is not nearly so
useful as printing the full inode FID, since i_ino is a "compressed"
version of the FID and there may be duplicate values for i_ino in some
cases (especially if running on a 32-bit client).

All instances of printing i_ino/i_generation are replaced with
the FID using ll_inode2fid(). All instances, except for one, of
printing just i_ino was replaced by printing the FID. In all
CERROR lines touched by the i_ino replacements, the device name
or fsname was added at the beginning of the message if it did not
already exist.
Signed-off-by: default avatarJames Nunez <james.a.nunez@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3491
Reviewed-on: http://review.whamcloud.com/6848Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b97fa87f
...@@ -250,8 +250,8 @@ void ll_invalidate_aliases(struct inode *inode) ...@@ -250,8 +250,8 @@ void ll_invalidate_aliases(struct inode *inode)
{ {
struct dentry *dentry; struct dentry *dentry;
CDEBUG(D_INODE, "marking dentries for ino %lu/%u(%p) invalid\n", CDEBUG(D_INODE, "marking dentries for ino "DFID"(%p) invalid\n",
inode->i_ino, inode->i_generation, inode); PFID(ll_inode2fid(inode)), inode);
ll_lock_dcache(inode); ll_lock_dcache(inode);
hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) {
...@@ -286,8 +286,8 @@ void ll_lookup_finish_locks(struct lookup_intent *it, struct inode *inode) ...@@ -286,8 +286,8 @@ void ll_lookup_finish_locks(struct lookup_intent *it, struct inode *inode)
if (it->d.lustre.it_lock_mode && inode) { if (it->d.lustre.it_lock_mode && inode) {
struct ll_sb_info *sbi = ll_i2sbi(inode); struct ll_sb_info *sbi = ll_i2sbi(inode);
CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n", CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"(%p)\n",
inode, inode->i_ino, inode->i_generation); PFID(ll_inode2fid(inode)), inode);
ll_set_lock_data(sbi->ll_md_exp, inode, it, NULL); ll_set_lock_data(sbi->ll_md_exp, inode, it, NULL);
} }
......
...@@ -158,8 +158,8 @@ static int ll_dir_filler(void *_hash, struct page *page0) ...@@ -158,8 +158,8 @@ static int ll_dir_filler(void *_hash, struct page *page0)
int i; int i;
int rc; int rc;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) hash %llu\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p) hash %llu\n",
inode->i_ino, inode->i_generation, inode, hash); PFID(ll_inode2fid(inode)), inode, hash);
LASSERT(max_pages > 0 && max_pages <= MD_MAX_BRW_PAGES); LASSERT(max_pages > 0 && max_pages <= MD_MAX_BRW_PAGES);
...@@ -372,8 +372,8 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, ...@@ -372,8 +372,8 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
return ERR_PTR(rc); return ERR_PTR(rc);
} }
CDEBUG(D_INODE, "setting lr_lvb_inode to inode %p (%lu/%u)\n", CDEBUG(D_INODE, "setting lr_lvb_inode to inode "DFID"(%p)\n",
dir, dir->i_ino, dir->i_generation); PFID(ll_inode2fid(dir)), dir);
md_set_lock_data(ll_i2sbi(dir)->ll_md_exp, md_set_lock_data(ll_i2sbi(dir)->ll_md_exp,
&it.d.lustre.it_lock_handle, dir, NULL); &it.d.lustre.it_lock_handle, dir, NULL);
} else { } else {
...@@ -616,9 +616,9 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx) ...@@ -616,9 +616,9 @@ static int ll_readdir(struct file *filp, struct dir_context *ctx)
int api32 = ll_need_32bit_api(sbi); int api32 = ll_need_32bit_api(sbi);
int rc; int rc;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) pos %lu/%llu 32bit_api %d\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p) pos %lu/%llu 32bit_api %d\n",
inode->i_ino, inode->i_generation, PFID(ll_inode2fid(inode)), inode, (unsigned long)pos,
inode, (unsigned long)pos, i_size_read(inode), api32); i_size_read(inode), api32);
if (pos == MDS_DIR_END_OFF) { if (pos == MDS_DIR_END_OFF) {
/* /*
...@@ -828,9 +828,8 @@ int ll_dir_getstripe(struct inode *inode, struct lov_mds_md **lmmp, ...@@ -828,9 +828,8 @@ int ll_dir_getstripe(struct inode *inode, struct lov_mds_md **lmmp,
rc = md_getattr(sbi->ll_md_exp, op_data, &req); rc = md_getattr(sbi->ll_md_exp, op_data, &req);
ll_finish_md_op_data(op_data); ll_finish_md_op_data(op_data);
if (rc < 0) { if (rc < 0) {
CDEBUG(D_INFO, "md_getattr failed on inode %lu/%u: rc %d\n", CDEBUG(D_INFO, "md_getattr failed on inode "DFID": rc %d\n",
inode->i_ino, PFID(ll_inode2fid(inode)), rc);
inode->i_generation, rc);
goto out; goto out;
} }
...@@ -1267,8 +1266,8 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -1267,8 +1266,8 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
struct obd_ioctl_data *data; struct obd_ioctl_data *data;
int rc = 0; int rc = 0;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), cmd=%#x\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), cmd=%#x\n",
inode->i_ino, inode->i_generation, inode, cmd); PFID(ll_inode2fid(inode)), inode, cmd);
/* asm-ppc{,64} declares TCGETS, et. al. as type 't' not 'T' */ /* asm-ppc{,64} declares TCGETS, et. al. as type 't' not 'T' */
if (_IOC_TYPE(cmd) == 'T' || _IOC_TYPE(cmd) == 't') /* tty ioctls */ if (_IOC_TYPE(cmd) == 'T' || _IOC_TYPE(cmd) == 't') /* tty ioctls */
......
...@@ -170,13 +170,15 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp, ...@@ -170,13 +170,15 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp,
*/ */
rc = ll_som_update(inode, op_data); rc = ll_som_update(inode, op_data);
if (rc) { if (rc) {
CERROR("inode %lu mdc Size-on-MDS update failed: rc = %d\n", CERROR("%s: inode "DFID" mdc Size-on-MDS update failed: rc = %d\n",
inode->i_ino, rc); ll_i2mdexp(inode)->exp_obd->obd_name,
PFID(ll_inode2fid(inode)), rc);
rc = 0; rc = 0;
} }
} else if (rc) { } else if (rc) {
CERROR("inode %lu mdc close failed: rc = %d\n", CERROR("%s: inode "DFID" mdc close failed: rc = %d\n",
inode->i_ino, rc); ll_i2mdexp(inode)->exp_obd->obd_name,
PFID(ll_inode2fid(inode)), rc);
} }
/* DATA_MODIFIED flag was successfully sent on close, cancel data /* DATA_MODIFIED flag was successfully sent on close, cancel data
...@@ -343,8 +345,8 @@ int ll_file_release(struct inode *inode, struct file *file) ...@@ -343,8 +345,8 @@ int ll_file_release(struct inode *inode, struct file *file)
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
int rc; int rc;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino, CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
inode->i_generation, inode); PFID(ll_inode2fid(inode)), inode);
#ifdef CONFIG_FS_POSIX_ACL #ifdef CONFIG_FS_POSIX_ACL
if (sbi->ll_flags & LL_SBI_RMT_CLIENT && is_root_inode(inode)) { if (sbi->ll_flags & LL_SBI_RMT_CLIENT && is_root_inode(inode)) {
...@@ -543,8 +545,8 @@ int ll_file_open(struct inode *inode, struct file *file) ...@@ -543,8 +545,8 @@ int ll_file_open(struct inode *inode, struct file *file)
struct ll_file_data *fd; struct ll_file_data *fd;
int rc = 0, opendir_set = 0; int rc = 0, opendir_set = 0;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), flags %o\n", inode->i_ino, CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), flags %o\n",
inode->i_generation, inode, file->f_flags); PFID(ll_inode2fid(inode)), inode, file->f_flags);
it = file->private_data; /* XXX: compat macro */ it = file->private_data; /* XXX: compat macro */
file->private_data = NULL; /* prevent ll_local_open assertion */ file->private_data = NULL; /* prevent ll_local_open assertion */
...@@ -1383,8 +1385,8 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry, ...@@ -1383,8 +1385,8 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry,
lsm = ccc_inode_lsm_get(inode); lsm = ccc_inode_lsm_get(inode);
if (lsm) { if (lsm) {
ccc_inode_lsm_put(inode, lsm); ccc_inode_lsm_put(inode, lsm);
CDEBUG(D_IOCTL, "stripe already exists for ino %lu\n", CDEBUG(D_IOCTL, "stripe already exists for inode "DFID"\n",
inode->i_ino); PFID(ll_inode2fid(inode)));
rc = -EEXIST; rc = -EEXIST;
goto out; goto out;
} }
...@@ -2248,8 +2250,8 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -2248,8 +2250,8 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
struct ll_file_data *fd = LUSTRE_FPRIVATE(file); struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
int flags, rc; int flags, rc;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),cmd=%x\n", inode->i_ino, CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p),cmd=%x\n",
inode->i_generation, inode, cmd); PFID(ll_inode2fid(inode)), inode, cmd);
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_IOCTL, 1); ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_IOCTL, 1);
/* asm-ppc{,64} declares TCGETS, et. al. as type 't' not 'T' */ /* asm-ppc{,64} declares TCGETS, et. al. as type 't' not 'T' */
...@@ -2557,9 +2559,8 @@ static loff_t ll_file_seek(struct file *file, loff_t offset, int origin) ...@@ -2557,9 +2559,8 @@ static loff_t ll_file_seek(struct file *file, loff_t offset, int origin)
retval = offset + ((origin == SEEK_END) ? i_size_read(inode) : retval = offset + ((origin == SEEK_END) ? i_size_read(inode) :
(origin == SEEK_CUR) ? file->f_pos : 0); (origin == SEEK_CUR) ? file->f_pos : 0);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), to=%llu=%#llx(%d)\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), to=%llu=%#llx(%d)\n",
inode->i_ino, inode->i_generation, inode, retval, retval, PFID(ll_inode2fid(inode)), inode, retval, retval, origin);
origin);
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LLSEEK, 1); ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LLSEEK, 1);
if (origin == SEEK_END || origin == SEEK_HOLE || origin == SEEK_DATA) { if (origin == SEEK_END || origin == SEEK_HOLE || origin == SEEK_DATA) {
...@@ -2654,8 +2655,8 @@ int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync) ...@@ -2654,8 +2655,8 @@ int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync)
struct ptlrpc_request *req; struct ptlrpc_request *req;
int rc, err; int rc, err;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino, CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
inode->i_generation, inode); PFID(ll_inode2fid(inode)), inode);
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FSYNC, 1); ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FSYNC, 1);
rc = filemap_write_and_wait_range(inode->i_mapping, start, end); rc = filemap_write_and_wait_range(inode->i_mapping, start, end);
...@@ -2713,8 +2714,8 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) ...@@ -2713,8 +2714,8 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
int rc; int rc;
int rc2 = 0; int rc2 = 0;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu file_lock=%p\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID" file_lock=%p\n",
inode->i_ino, file_lock); PFID(ll_inode2fid(inode)), file_lock);
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FLOCK, 1); ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FLOCK, 1);
...@@ -2797,9 +2798,9 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) ...@@ -2797,9 +2798,9 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
if (IS_ERR(op_data)) if (IS_ERR(op_data))
return PTR_ERR(op_data); return PTR_ERR(op_data);
CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#llx, mode=%u, start=%llu, end=%llu\n", CDEBUG(D_DLMTRACE, "inode="DFID", pid=%u, flags=%#llx, mode=%u, start=%llu, end=%llu\n",
inode->i_ino, flock.l_flock.pid, flags, einfo.ei_mode, PFID(ll_inode2fid(inode)), flock.l_flock.pid, flags,
flock.l_flock.start, flock.l_flock.end); einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);
rc = md_enqueue(sbi->ll_md_exp, &einfo, NULL, rc = md_enqueue(sbi->ll_md_exp, &einfo, NULL,
op_data, &lockh, &flock, 0, NULL /* req */, flags); op_data, &lockh, &flock, 0, NULL /* req */, flags);
...@@ -2921,8 +2922,8 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits) ...@@ -2921,8 +2922,8 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
struct obd_export *exp; struct obd_export *exp;
int rc = 0; int rc = 0;
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),name=%pd\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p),name=%pd\n",
inode->i_ino, inode->i_generation, inode, dentry); PFID(ll_inode2fid(inode)), inode, dentry);
exp = ll_i2mdexp(inode); exp = ll_i2mdexp(inode);
...@@ -3144,8 +3145,8 @@ int ll_inode_permission(struct inode *inode, int mask) ...@@ -3144,8 +3145,8 @@ int ll_inode_permission(struct inode *inode, int mask)
return rc; return rc;
} }
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), inode mode %x mask %o\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), inode mode %x mask %o\n",
inode->i_ino, inode->i_generation, inode, inode->i_mode, mask); PFID(ll_inode2fid(inode)), inode, inode->i_mode, mask);
if (ll_i2sbi(inode)->ll_flags & LL_SBI_RMT_CLIENT) if (ll_i2sbi(inode)->ll_flags & LL_SBI_RMT_CLIENT)
return lustre_check_remote_perm(inode, mask); return lustre_check_remote_perm(inode, mask);
...@@ -3435,8 +3436,8 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode, ...@@ -3435,8 +3436,8 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,
LASSERT(lock); LASSERT(lock);
LASSERT(ldlm_has_layout(lock)); LASSERT(ldlm_has_layout(lock));
LDLM_DEBUG(lock, "File %p/"DFID" being reconfigured: %d", LDLM_DEBUG(lock, "File "DFID"(%p) being reconfigured: %d",
inode, PFID(&lli->lli_fid), reconf); PFID(&lli->lli_fid), inode, reconf);
/* in case this is a caching lock and reinstate with new inode */ /* in case this is a caching lock and reinstate with new inode */
md_set_lock_data(sbi->ll_md_exp, &lockh->cookie, inode, NULL); md_set_lock_data(sbi->ll_md_exp, &lockh->cookie, inode, NULL);
...@@ -3507,9 +3508,9 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode, ...@@ -3507,9 +3508,9 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,
/* wait for IO to complete if it's still being used. */ /* wait for IO to complete if it's still being used. */
if (wait_layout) { if (wait_layout) {
CDEBUG(D_INODE, "%s: %p/" DFID " wait for layout reconf.\n", CDEBUG(D_INODE, "%s: "DFID"(%p) wait for layout reconf\n",
ll_get_fsname(inode->i_sb, NULL, 0), ll_get_fsname(inode->i_sb, NULL, 0),
inode, PFID(&lli->lli_fid)); PFID(&lli->lli_fid), inode);
memset(&conf, 0, sizeof(conf)); memset(&conf, 0, sizeof(conf));
conf.coc_opc = OBJECT_CONF_WAIT; conf.coc_opc = OBJECT_CONF_WAIT;
...@@ -3518,7 +3519,8 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode, ...@@ -3518,7 +3519,8 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,
if (rc == 0) if (rc == 0)
rc = -EAGAIN; rc = -EAGAIN;
CDEBUG(D_INODE, "file: " DFID " waiting layout return: %d.\n", CDEBUG(D_INODE, "%s: file="DFID" waiting layout return: %d.\n",
ll_get_fsname(inode->i_sb, NULL, 0),
PFID(&lli->lli_fid), rc); PFID(&lli->lli_fid), rc);
} }
return rc; return rc;
...@@ -3591,9 +3593,9 @@ int ll_layout_refresh(struct inode *inode, __u32 *gen) ...@@ -3591,9 +3593,9 @@ int ll_layout_refresh(struct inode *inode, __u32 *gen)
it.it_op = IT_LAYOUT; it.it_op = IT_LAYOUT;
lockh.cookie = 0ULL; lockh.cookie = 0ULL;
LDLM_DEBUG_NOLOCK("%s: requeue layout lock for file %p/" DFID "", LDLM_DEBUG_NOLOCK("%s: requeue layout lock for file "DFID"(%p)",
ll_get_fsname(inode->i_sb, NULL, 0), inode, ll_get_fsname(inode->i_sb, NULL, 0),
PFID(&lli->lli_fid)); PFID(&lli->lli_fid), inode);
rc = md_enqueue(sbi->ll_md_exp, &einfo, &it, op_data, &lockh, rc = md_enqueue(sbi->ll_md_exp, &einfo, &it, op_data, &lockh,
NULL, 0, NULL, 0); NULL, 0, NULL, 0);
......
...@@ -90,15 +90,15 @@ void ll_queue_done_writing(struct inode *inode, unsigned long flags) ...@@ -90,15 +90,15 @@ void ll_queue_done_writing(struct inode *inode, unsigned long flags)
struct ll_close_queue *lcq = ll_i2sbi(inode)->ll_lcq; struct ll_close_queue *lcq = ll_i2sbi(inode)->ll_lcq;
if (lli->lli_flags & LLIF_MDS_SIZE_LOCK) if (lli->lli_flags & LLIF_MDS_SIZE_LOCK)
CWARN("ino %lu/%u(flags %u) som valid it just after recovery\n", CWARN("%s: file "DFID"(flags %u) Size-on-MDS valid, done writing allowed and no diry pages\n",
inode->i_ino, inode->i_generation, ll_get_fsname(inode->i_sb, NULL, 0),
lli->lli_flags); PFID(ll_inode2fid(inode)), lli->lli_flags);
/* DONE_WRITING is allowed and inode has no dirty page. */ /* DONE_WRITING is allowed and inode has no dirty page. */
spin_lock(&lcq->lcq_lock); spin_lock(&lcq->lcq_lock);
LASSERT(list_empty(&lli->lli_close_list)); LASSERT(list_empty(&lli->lli_close_list));
CDEBUG(D_INODE, "adding inode %lu/%u to close list\n", CDEBUG(D_INODE, "adding inode "DFID" to close list\n",
inode->i_ino, inode->i_generation); PFID(ll_inode2fid(inode)));
list_add_tail(&lli->lli_close_list, &lcq->lcq_head); list_add_tail(&lli->lli_close_list, &lcq->lcq_head);
/* Avoid a concurrent insertion into the close thread queue: /* Avoid a concurrent insertion into the close thread queue:
...@@ -124,9 +124,9 @@ void ll_done_writing_attr(struct inode *inode, struct md_op_data *op_data) ...@@ -124,9 +124,9 @@ void ll_done_writing_attr(struct inode *inode, struct md_op_data *op_data)
op_data->op_flags |= MF_SOM_CHANGE; op_data->op_flags |= MF_SOM_CHANGE;
/* Check if Size-on-MDS attributes are valid. */ /* Check if Size-on-MDS attributes are valid. */
if (lli->lli_flags & LLIF_MDS_SIZE_LOCK) if (lli->lli_flags & LLIF_MDS_SIZE_LOCK)
CERROR("ino %lu/%u(flags %u) som valid it just after recovery\n", CERROR("%s: inode "DFID"(flags %u) MDS holds lock on Size-on-MDS attributes\n",
inode->i_ino, inode->i_generation, ll_get_fsname(inode->i_sb, NULL, 0),
lli->lli_flags); PFID(ll_inode2fid(inode)), lli->lli_flags);
if (!cl_local_size(inode)) { if (!cl_local_size(inode)) {
/* Send Size-on-MDS Attributes if valid. */ /* Send Size-on-MDS Attributes if valid. */
...@@ -221,9 +221,9 @@ int ll_som_update(struct inode *inode, struct md_op_data *op_data) ...@@ -221,9 +221,9 @@ int ll_som_update(struct inode *inode, struct md_op_data *op_data)
LASSERT(op_data); LASSERT(op_data);
if (lli->lli_flags & LLIF_MDS_SIZE_LOCK) if (lli->lli_flags & LLIF_MDS_SIZE_LOCK)
CERROR("ino %lu/%u(flags %u) som valid it just after recovery\n", CERROR("%s: inode "DFID"(flags %u) MDS holds lock on Size-on-MDS attributes\n",
inode->i_ino, inode->i_generation, ll_get_fsname(inode->i_sb, NULL, 0),
lli->lli_flags); PFID(ll_inode2fid(inode)), lli->lli_flags);
oa = kmem_cache_zalloc(obdo_cachep, GFP_NOFS); oa = kmem_cache_zalloc(obdo_cachep, GFP_NOFS);
if (!oa) { if (!oa) {
...@@ -241,9 +241,9 @@ int ll_som_update(struct inode *inode, struct md_op_data *op_data) ...@@ -241,9 +241,9 @@ int ll_som_update(struct inode *inode, struct md_op_data *op_data)
if (rc) { if (rc) {
oa->o_valid = 0; oa->o_valid = 0;
if (rc != -ENOENT) if (rc != -ENOENT)
CERROR("inode_getattr failed (%d): unable to send a Size-on-MDS attribute update for inode %lu/%u\n", CERROR("%s: inode_getattr failed - unable to send a Size-on-MDS attribute update for inode "DFID": rc = %d\n",
rc, inode->i_ino, ll_get_fsname(inode->i_sb, NULL, 0),
inode->i_generation); PFID(ll_inode2fid(inode)), rc);
} else { } else {
CDEBUG(D_INODE, "Size-on-MDS update on "DFID"\n", CDEBUG(D_INODE, "Size-on-MDS update on "DFID"\n",
PFID(&lli->lli_fid)); PFID(&lli->lli_fid));
...@@ -302,9 +302,11 @@ static void ll_done_writing(struct inode *inode) ...@@ -302,9 +302,11 @@ static void ll_done_writing(struct inode *inode)
* OSTs and send setattr to back to MDS. * OSTs and send setattr to back to MDS.
*/ */
rc = ll_som_update(inode, op_data); rc = ll_som_update(inode, op_data);
else if (rc) else if (rc) {
CERROR("inode %lu mdc done_writing failed: rc = %d\n", CERROR("%s: inode "DFID" mdc done_writing failed: rc = %d\n",
inode->i_ino, rc); ll_get_fsname(inode->i_sb, NULL, 0),
PFID(ll_inode2fid(inode)), rc);
}
out: out:
ll_finish_md_op_data(op_data); ll_finish_md_op_data(op_data);
if (och) { if (och) {
...@@ -349,8 +351,8 @@ static int ll_close_thread(void *arg) ...@@ -349,8 +351,8 @@ static int ll_close_thread(void *arg)
break; break;
inode = ll_info2i(lli); inode = ll_info2i(lli);
CDEBUG(D_INFO, "done_writing for inode %lu/%u\n", CDEBUG(D_INFO, "done_writing for inode "DFID"\n",
inode->i_ino, inode->i_generation); PFID(ll_inode2fid(inode)));
ll_done_writing(inode); ll_done_writing(inode);
iput(inode); iput(inode);
} }
......
...@@ -1288,18 +1288,16 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, ...@@ -1288,18 +1288,16 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode,
*/ */
if (it->d.lustre.it_remote_lock_mode) { if (it->d.lustre.it_remote_lock_mode) {
handle.cookie = it->d.lustre.it_remote_lock_handle; handle.cookie = it->d.lustre.it_remote_lock_handle;
CDEBUG(D_DLMTRACE, "setting l_data to inode %p(%lu/%u) for remote lock %#llx\n", CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"%p for remote lock %#llx\n",
inode, PFID(ll_inode2fid(inode)), inode,
inode->i_ino, inode->i_generation,
handle.cookie); handle.cookie);
md_set_lock_data(exp, &handle.cookie, inode, NULL); md_set_lock_data(exp, &handle.cookie, inode, NULL);
} }
handle.cookie = it->d.lustre.it_lock_handle; handle.cookie = it->d.lustre.it_lock_handle;
CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u) for lock %#llx\n", CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"%p for lock %#llx\n",
inode, inode->i_ino, PFID(ll_inode2fid(inode)), inode, handle.cookie);
inode->i_generation, handle.cookie);
md_set_lock_data(exp, &handle.cookie, inode, md_set_lock_data(exp, &handle.cookie, inode,
&it->d.lustre.it_lock_bits); &it->d.lustre.it_lock_bits);
......
...@@ -1033,8 +1033,8 @@ void ll_clear_inode(struct inode *inode) ...@@ -1033,8 +1033,8 @@ void ll_clear_inode(struct inode *inode)
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
struct ll_sb_info *sbi = ll_i2sbi(inode); struct ll_sb_info *sbi = ll_i2sbi(inode);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino, CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
inode->i_generation, inode); PFID(ll_inode2fid(inode)), inode);
if (S_ISDIR(inode->i_mode)) { if (S_ISDIR(inode->i_mode)) {
/* these should have been cleared in ll_file_release */ /* these should have been cleared in ll_file_release */
...@@ -1181,9 +1181,11 @@ static int ll_setattr_done_writing(struct inode *inode, ...@@ -1181,9 +1181,11 @@ static int ll_setattr_done_writing(struct inode *inode,
* from OSTs and send setattr to back to MDS. * from OSTs and send setattr to back to MDS.
*/ */
rc = ll_som_update(inode, op_data); rc = ll_som_update(inode, op_data);
else if (rc) else if (rc) {
CERROR("inode %lu mdc truncate failed: rc = %d\n", CERROR("%s: inode "DFID" mdc truncate failed: rc = %d\n",
inode->i_ino, rc); ll_i2sbi(inode)->ll_md_exp->exp_obd->obd_name,
PFID(ll_inode2fid(inode)), rc);
}
return rc; return rc;
} }
...@@ -1211,12 +1213,9 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) ...@@ -1211,12 +1213,9 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
bool file_is_released = false; bool file_is_released = false;
int rc = 0, rc1 = 0; int rc = 0, rc1 = 0;
CDEBUG(D_VFSTRACE, CDEBUG(D_VFSTRACE, "%s: setattr inode "DFID"(%p) from %llu to %llu, valid %x, hsm_import %d\n",
"%s: setattr inode %p/fid:" DFID ll_get_fsname(inode->i_sb, NULL, 0), PFID(&lli->lli_fid), inode,
" from %llu to %llu, valid %x, hsm_import %d\n", i_size_read(inode), attr->ia_size, attr->ia_valid, hsm_import);
ll_get_fsname(inode->i_sb, NULL, 0), inode,
PFID(&lli->lli_fid), i_size_read(inode), attr->ia_size,
attr->ia_valid, hsm_import);
if (attr->ia_valid & ATTR_SIZE) { if (attr->ia_valid & ATTR_SIZE) {
/* Check new size against VFS/VM file size limit and rlimit */ /* Check new size against VFS/VM file size limit and rlimit */
...@@ -1590,10 +1589,9 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) ...@@ -1590,10 +1589,9 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
/* FID shouldn't be changed! */ /* FID shouldn't be changed! */
if (fid_is_sane(&lli->lli_fid)) { if (fid_is_sane(&lli->lli_fid)) {
LASSERTF(lu_fid_eq(&lli->lli_fid, &body->fid1), LASSERTF(lu_fid_eq(&lli->lli_fid, &body->fid1),
"Trying to change FID "DFID "Trying to change FID "DFID" to the "DFID", inode "DFID"(%p)\n",
" to the "DFID", inode %lu/%u(%p)\n",
PFID(&lli->lli_fid), PFID(&body->fid1), PFID(&lli->lli_fid), PFID(&body->fid1),
inode->i_ino, inode->i_generation, inode); PFID(ll_inode2fid(inode)), inode);
} else { } else {
lli->lli_fid = body->fid1; lli->lli_fid = body->fid1;
} }
...@@ -1620,8 +1618,10 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) ...@@ -1620,8 +1618,10 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
if (lli->lli_flags & (LLIF_DONE_WRITING | if (lli->lli_flags & (LLIF_DONE_WRITING |
LLIF_EPOCH_PENDING | LLIF_EPOCH_PENDING |
LLIF_SOM_DIRTY)) { LLIF_SOM_DIRTY)) {
CERROR("ino %lu flags %u still has size authority! do not trust the size got from MDS\n", CERROR("%s: inode "DFID" flags %u still has size authority! do not trust the size got from MDS\n",
inode->i_ino, lli->lli_flags); sbi->ll_md_exp->exp_obd->obd_name,
PFID(ll_inode2fid(inode)),
lli->lli_flags);
} else { } else {
/* Use old size assignment to avoid /* Use old size assignment to avoid
* deadlock bz14138 & bz14326 * deadlock bz14138 & bz14326
...@@ -1713,8 +1713,8 @@ void ll_delete_inode(struct inode *inode) ...@@ -1713,8 +1713,8 @@ void ll_delete_inode(struct inode *inode)
spin_lock_irq(&inode->i_data.tree_lock); spin_lock_irq(&inode->i_data.tree_lock);
spin_unlock_irq(&inode->i_data.tree_lock); spin_unlock_irq(&inode->i_data.tree_lock);
LASSERTF(inode->i_data.nrpages == 0, LASSERTF(inode->i_data.nrpages == 0,
"inode=%lu/%u(%p) nrpages=%lu, see http://jira.whamcloud.com/browse/LU-118\n", "inode="DFID"(%p) nrpages=%lu, see http://jira.whamcloud.com/browse/LU-118\n",
inode->i_ino, inode->i_generation, inode, PFID(ll_inode2fid(inode)), inode,
inode->i_data.nrpages); inode->i_data.nrpages);
} }
/* Workaround end */ /* Workaround end */
...@@ -1745,7 +1745,9 @@ int ll_iocontrol(struct inode *inode, struct file *file, ...@@ -1745,7 +1745,9 @@ int ll_iocontrol(struct inode *inode, struct file *file,
rc = md_getattr(sbi->ll_md_exp, op_data, &req); rc = md_getattr(sbi->ll_md_exp, op_data, &req);
ll_finish_md_op_data(op_data); ll_finish_md_op_data(op_data);
if (rc) { if (rc) {
CERROR("failure %d inode %lu\n", rc, inode->i_ino); CERROR("%s: failure inode "DFID": rc = %d\n",
sbi->ll_md_exp->exp_obd->obd_name,
PFID(ll_inode2fid(inode)), rc);
return -abs(rc); return -abs(rc);
} }
......
...@@ -394,9 +394,11 @@ static int ll_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -394,9 +394,11 @@ static int ll_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
result = ll_page_mkwrite0(vma, vmf->page, &retry); result = ll_page_mkwrite0(vma, vmf->page, &retry);
if (!printed && ++count > 16) { if (!printed && ++count > 16) {
CWARN("app(%s): the page %lu of file %lu is under heavy contention.\n", const struct dentry *de = vma->vm_file->f_path.dentry;
CWARN("app(%s): the page %lu of file "DFID" is under heavy contention\n",
current->comm, vmf->pgoff, current->comm, vmf->pgoff,
file_inode(vma->vm_file)->i_ino); PFID(ll_inode2fid(de->d_inode)));
printed = true; printed = true;
} }
} while (retry); } while (retry);
......
...@@ -191,8 +191,9 @@ static int ll_encode_fh(struct inode *inode, __u32 *fh, int *plen, ...@@ -191,8 +191,9 @@ static int ll_encode_fh(struct inode *inode, __u32 *fh, int *plen,
int fileid_len = sizeof(struct lustre_nfs_fid) / 4; int fileid_len = sizeof(struct lustre_nfs_fid) / 4;
struct lustre_nfs_fid *nfs_fid = (void *)fh; struct lustre_nfs_fid *nfs_fid = (void *)fh;
CDEBUG(D_INFO, "encoding for (%lu," DFID ") maxlen=%d minlen=%d\n", CDEBUG(D_INFO, "%s: encoding for ("DFID") maxlen=%d minlen=%d\n",
inode->i_ino, PFID(ll_inode2fid(inode)), *plen, fileid_len); ll_get_fsname(inode->i_sb, NULL, 0),
PFID(ll_inode2fid(inode)), *plen, fileid_len);
if (*plen < fileid_len) { if (*plen < fileid_len) {
*plen = fileid_len; *plen = fileid_len;
...@@ -298,8 +299,9 @@ static struct dentry *ll_get_parent(struct dentry *dchild) ...@@ -298,8 +299,9 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
sbi = ll_s2sbi(dir->i_sb); sbi = ll_s2sbi(dir->i_sb);
CDEBUG(D_INFO, "getting parent for (%lu," DFID ")\n", CDEBUG(D_INFO, "%s: getting parent for ("DFID")\n",
dir->i_ino, PFID(ll_inode2fid(dir))); ll_get_fsname(dir->i_sb, NULL, 0),
PFID(ll_inode2fid(dir)));
rc = ll_get_default_mdsize(sbi, &lmmsize); rc = ll_get_default_mdsize(sbi, &lmmsize);
if (rc != 0) if (rc != 0)
...@@ -314,7 +316,9 @@ static struct dentry *ll_get_parent(struct dentry *dchild) ...@@ -314,7 +316,9 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
rc = md_getattr_name(sbi->ll_md_exp, op_data, &req); rc = md_getattr_name(sbi->ll_md_exp, op_data, &req);
ll_finish_md_op_data(op_data); ll_finish_md_op_data(op_data);
if (rc) { if (rc) {
CERROR("failure %d inode %lu get parent\n", rc, dir->i_ino); CERROR("%s: failure inode "DFID" get parent: rc = %d\n",
ll_get_fsname(dir->i_sb, NULL, 0),
PFID(ll_inode2fid(dir)), rc);
return ERR_PTR(rc); return ERR_PTR(rc);
} }
body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
......
...@@ -133,9 +133,9 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash, ...@@ -133,9 +133,9 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash,
} }
} else if (!(inode->i_state & (I_FREEING | I_CLEAR))) { } else if (!(inode->i_state & (I_FREEING | I_CLEAR))) {
ll_update_inode(inode, md); ll_update_inode(inode, md);
CDEBUG(D_VFSTRACE, "got inode: "DFID"(%p)\n",
PFID(&md->body->fid1), inode);
} }
CDEBUG(D_VFSTRACE, "got inode: %p for "DFID"\n",
inode, PFID(&md->body->fid1));
} }
return inode; return inode;
} }
...@@ -257,8 +257,8 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, ...@@ -257,8 +257,8 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
} }
if ((bits & MDS_INODELOCK_UPDATE) && S_ISDIR(inode->i_mode)) { if ((bits & MDS_INODELOCK_UPDATE) && S_ISDIR(inode->i_mode)) {
CDEBUG(D_INODE, "invalidating inode %lu\n", CDEBUG(D_INODE, "invalidating inode "DFID"\n",
inode->i_ino); PFID(ll_inode2fid(inode)));
truncate_inode_pages(inode->i_mapping, 0); truncate_inode_pages(inode->i_mapping, 0);
ll_invalidate_negative_children(inode); ll_invalidate_negative_children(inode);
} }
...@@ -478,9 +478,8 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, ...@@ -478,9 +478,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=%pd,dir=%lu/%u(%p),intent=%s\n", CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir="DFID"(%p),intent=%s\n",
dentry, parent->i_ino, dentry, PFID(ll_inode2fid(parent)), parent, LL_IT2STR(it));
parent->i_generation, parent, LL_IT2STR(it));
if (d_mountpoint(dentry)) if (d_mountpoint(dentry))
CERROR("Tell Peter, lookup on mtpt, it %s\n", LL_IT2STR(it)); CERROR("Tell Peter, lookup on mtpt, it %s\n", LL_IT2STR(it));
...@@ -555,9 +554,8 @@ static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry, ...@@ -555,9 +554,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=%pd,dir=%lu/%u(%p),flags=%u\n", CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir="DFID"(%p),flags=%u\n",
dentry, parent->i_ino, dentry, PFID(ll_inode2fid(parent)), 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. */
if ((flags & LOOKUP_CREATE) && !(flags & LOOKUP_OPEN)) if ((flags & LOOKUP_CREATE) && !(flags & LOOKUP_OPEN))
...@@ -588,10 +586,9 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry, ...@@ -588,10 +586,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, CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir="DFID"(%p),file %p,open_flags %x,mode %x opened %d\n",
"VFS Op:name=%pd,dir=%lu/%u(%p),file %p,open_flags %x,mode %x opened %d\n", dentry, PFID(ll_inode2fid(dir)), dir, file, open_flags, mode,
dentry, dir->i_ino, *opened);
dir->i_generation, dir, file, open_flags, mode, *opened);
it = kzalloc(sizeof(*it), GFP_NOFS); it = kzalloc(sizeof(*it), GFP_NOFS);
if (!it) if (!it)
...@@ -682,8 +679,8 @@ static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it) ...@@ -682,8 +679,8 @@ static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it)
* lock on the inode. Since we finally have an inode pointer, * lock on the inode. Since we finally have an inode pointer,
* stuff it in the lock. * stuff it in the lock.
*/ */
CDEBUG(D_DLMTRACE, "setting l_ast_data to inode %p (%lu/%u)\n", CDEBUG(D_DLMTRACE, "setting l_ast_data to inode "DFID"(%p)\n",
inode, inode->i_ino, inode->i_generation); PFID(ll_inode2fid(dir)), inode);
ll_set_lock_data(sbi->ll_md_exp, inode, it, NULL); ll_set_lock_data(sbi->ll_md_exp, inode, it, NULL);
out: out:
ptlrpc_req_finished(request); ptlrpc_req_finished(request);
...@@ -710,9 +707,8 @@ static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode, ...@@ -710,9 +707,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=%pd,dir=%lu/%u(%p),intent=%s\n", CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir="DFID"(%p), intent=%s\n",
dentry, dir->i_ino, dentry, PFID(ll_inode2fid(dir)), 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);
if (rc) if (rc)
...@@ -735,8 +731,9 @@ static void ll_update_times(struct ptlrpc_request *request, ...@@ -735,8 +731,9 @@ static void ll_update_times(struct ptlrpc_request *request,
LASSERT(body); LASSERT(body);
if (body->valid & OBD_MD_FLMTIME && if (body->valid & OBD_MD_FLMTIME &&
body->mtime > LTIME_S(inode->i_mtime)) { body->mtime > LTIME_S(inode->i_mtime)) {
CDEBUG(D_INODE, "setting ino %lu mtime from %lu to %llu\n", CDEBUG(D_INODE, "setting fid "DFID" mtime from %lu to %llu\n",
inode->i_ino, LTIME_S(inode->i_mtime), body->mtime); PFID(ll_inode2fid(inode)), LTIME_S(inode->i_mtime),
body->mtime);
LTIME_S(inode->i_mtime) = body->mtime; LTIME_S(inode->i_mtime) = body->mtime;
} }
if (body->valid & OBD_MD_FLCTIME && if (body->valid & OBD_MD_FLCTIME &&
...@@ -793,9 +790,9 @@ static int ll_mknod(struct inode *dir, struct dentry *dchild, ...@@ -793,9 +790,9 @@ static int ll_mknod(struct inode *dir, struct dentry *dchild,
{ {
int err; int err;
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p) mode %o dev %x\n", CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir="DFID"(%p) mode %o dev %x\n",
dchild, dir->i_ino, dir->i_generation, dir, dchild, PFID(ll_inode2fid(dir)), dir, mode,
mode, old_encode_dev(rdev)); old_encode_dev(rdev));
if (!IS_POSIXACL(dir) || !exp_connect_umask(ll_i2mdexp(dir))) if (!IS_POSIXACL(dir) || !exp_connect_umask(ll_i2mdexp(dir)))
mode &= ~current_umask(); mode &= ~current_umask();
...@@ -833,9 +830,8 @@ static int ll_create_nd(struct inode *dir, struct dentry *dentry, ...@@ -833,9 +830,8 @@ static int ll_create_nd(struct inode *dir, struct dentry *dentry,
{ {
int rc; int rc;
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p),flags=%u, excl=%d\n", CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir="DFID"(%p), flags=%u, excl=%d\n",
dentry, dir->i_ino, dentry, PFID(ll_inode2fid(dir)), dir, mode, want_excl);
dir->i_generation, dir, mode, want_excl);
rc = ll_mknod(dir, dentry, mode, 0); rc = ll_mknod(dir, dentry, mode, 0);
...@@ -961,8 +957,8 @@ static int ll_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) ...@@ -961,8 +957,8 @@ static int ll_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ {
int err; int err;
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p)\n", CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir"DFID"(%p)\n",
dentry, dir->i_ino, dir->i_generation, dir); dentry, PFID(ll_inode2fid(dir)), dir);
if (!IS_POSIXACL(dir) || !exp_connect_umask(ll_i2mdexp(dir))) if (!IS_POSIXACL(dir) || !exp_connect_umask(ll_i2mdexp(dir)))
mode &= ~current_umask(); mode &= ~current_umask();
...@@ -981,8 +977,8 @@ static int ll_rmdir(struct inode *dir, struct dentry *dchild) ...@@ -981,8 +977,8 @@ static int ll_rmdir(struct inode *dir, struct dentry *dchild)
struct md_op_data *op_data; struct md_op_data *op_data;
int rc; int rc;
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p)\n", CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir="DFID"(%p)\n",
dchild, dir->i_ino, dir->i_generation, dir); dchild, PFID(ll_inode2fid(dir)), dir);
op_data = ll_prep_md_op_data(NULL, dir, NULL, op_data = ll_prep_md_op_data(NULL, dir, NULL,
dchild->d_name.name, dchild->d_name.name,
...@@ -1011,9 +1007,8 @@ static int ll_symlink(struct inode *dir, struct dentry *dentry, ...@@ -1011,9 +1007,8 @@ static int ll_symlink(struct inode *dir, struct dentry *dentry,
{ {
int err; int err;
CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p),target=%.*s\n", CDEBUG(D_VFSTRACE, "VFS Op:name=%pd, dir="DFID"(%p),target=%.*s\n",
dentry, dir->i_ino, dir->i_generation, dentry, PFID(ll_inode2fid(dir)), dir, 3000, oldname);
dir, 3000, oldname);
err = ll_new_node(dir, dentry, oldname, S_IFLNK | S_IRWXUGO, err = ll_new_node(dir, dentry, oldname, S_IFLNK | S_IRWXUGO,
0, LUSTRE_OPC_SYMLINK); 0, LUSTRE_OPC_SYMLINK);
...@@ -1033,10 +1028,9 @@ static int ll_link(struct dentry *old_dentry, struct inode *dir, ...@@ -1033,10 +1028,9 @@ static int ll_link(struct dentry *old_dentry, struct inode *dir,
struct md_op_data *op_data; struct md_op_data *op_data;
int err; int err;
CDEBUG(D_VFSTRACE, CDEBUG(D_VFSTRACE, "VFS Op: inode="DFID"(%p), dir="DFID"(%p), target=%pd\n",
"VFS Op: inode=%lu/%u(%p), dir=%lu/%u(%p), target=%pd\n", PFID(ll_inode2fid(src)), src, PFID(ll_inode2fid(dir)), dir,
src->i_ino, src->i_generation, src, dir->i_ino, new_dentry);
dir->i_generation, dir, new_dentry);
op_data = ll_prep_md_op_data(NULL, src, dir, new_dentry->d_name.name, op_data = ll_prep_md_op_data(NULL, src, dir, new_dentry->d_name.name,
new_dentry->d_name.len, new_dentry->d_name.len,
...@@ -1065,9 +1059,9 @@ static int ll_rename(struct inode *src, struct dentry *src_dchild, ...@@ -1065,9 +1059,9 @@ static int ll_rename(struct inode *src, struct dentry *src_dchild,
int err; int err;
CDEBUG(D_VFSTRACE, CDEBUG(D_VFSTRACE,
"VFS Op:oldname=%pd,src_dir=%lu/%u(%p),newname=%pd,tgt_dir=%lu/%u(%p)\n", "VFS Op:oldname=%pd, src_dir="DFID"(%p), newname=%pd, tgt_dir="DFID"(%p)\n",
src_dchild, src->i_ino, src->i_generation, src, src_dchild, PFID(ll_inode2fid(src)), src,
tgt_dchild, tgt->i_ino, tgt->i_generation, tgt); tgt_dchild, PFID(ll_inode2fid(tgt)), tgt);
op_data = ll_prep_md_op_data(NULL, src, tgt, NULL, 0, 0, op_data = ll_prep_md_op_data(NULL, src, tgt, NULL, 0, 0,
LUSTRE_OPC_ANY, NULL); LUSTRE_OPC_ANY, NULL);
......
...@@ -365,9 +365,8 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter, ...@@ -365,9 +365,8 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter,
if ((file_offset & ~PAGE_MASK) || (count & ~PAGE_MASK)) if ((file_offset & ~PAGE_MASK) || (count & ~PAGE_MASK))
return -EINVAL; return -EINVAL;
CDEBUG(D_VFSTRACE, CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), size=%zd (max %lu), offset=%lld=%llx, pages %zd (max %lu)\n",
"VFS Op:inode=%lu/%u(%p), size=%zd (max %lu), offset=%lld=%llx, pages %zd (max %lu)\n", PFID(ll_inode2fid(inode)), inode, count, MAX_DIO_SIZE,
inode->i_ino, inode->i_generation, inode, count, MAX_DIO_SIZE,
file_offset, file_offset, count >> PAGE_SHIFT, file_offset, file_offset, count >> PAGE_SHIFT,
MAX_DIO_SIZE >> PAGE_SHIFT); MAX_DIO_SIZE >> PAGE_SHIFT);
......
...@@ -661,8 +661,9 @@ static void ll_post_statahead(struct ll_statahead_info *sai) ...@@ -661,8 +661,9 @@ static void ll_post_statahead(struct ll_statahead_info *sai)
if (rc) if (rc)
goto out; goto out;
CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n", CDEBUG(D_DLMTRACE, "%s: setting l_data to inode "DFID"%p\n",
child, child->i_ino, child->i_generation); ll_get_fsname(child->i_sb, NULL, 0),
PFID(ll_inode2fid(child)), child);
ll_set_lock_data(ll_i2sbi(dir)->ll_md_exp, child, it, NULL); ll_set_lock_data(ll_i2sbi(dir)->ll_md_exp, child, it, NULL);
entry->se_inode = child; entry->se_inode = child;
...@@ -1591,13 +1592,11 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, ...@@ -1591,13 +1592,11 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp,
*dentryp = alias; *dentryp = alias;
} else if (d_inode(*dentryp) != inode) { } else if (d_inode(*dentryp) != inode) {
/* revalidate, but inode is recreated */ /* revalidate, but inode is recreated */
CDEBUG(D_READA, CDEBUG(D_READA, "%s: stale dentry %pd inode "DFID", statahead inode "DFID"\n",
"stale dentry %pd inode %lu/%u, statahead inode %lu/%u\n", ll_get_fsname(d_inode(*dentryp)->i_sb, NULL, 0),
*dentryp, *dentryp,
d_inode(*dentryp)->i_ino, PFID(ll_inode2fid(d_inode(*dentryp))),
d_inode(*dentryp)->i_generation, PFID(ll_inode2fid(inode)));
inode->i_ino,
inode->i_generation);
ll_sai_unplug(sai, entry); ll_sai_unplug(sai, entry);
return -ESTALE; return -ESTALE;
} else { } else {
......
...@@ -77,7 +77,9 @@ static int ll_readlink_internal(struct inode *inode, ...@@ -77,7 +77,9 @@ static int ll_readlink_internal(struct inode *inode,
ll_finish_md_op_data(op_data); ll_finish_md_op_data(op_data);
if (rc) { if (rc) {
if (rc != -ENOENT) if (rc != -ENOENT)
CERROR("inode %lu: rc = %d\n", inode->i_ino, rc); CERROR("%s: inode "DFID": rc = %d\n",
ll_get_fsname(inode->i_sb, NULL, 0),
PFID(ll_inode2fid(inode)), rc);
goto failed; goto failed;
} }
...@@ -90,8 +92,10 @@ static int ll_readlink_internal(struct inode *inode, ...@@ -90,8 +92,10 @@ static int ll_readlink_internal(struct inode *inode,
LASSERT(symlen != 0); LASSERT(symlen != 0);
if (body->eadatasize != symlen) { if (body->eadatasize != symlen) {
CERROR("inode %lu: symlink length %d not expected %d\n", CERROR("%s: inode "DFID": symlink length %d not expected %d\n",
inode->i_ino, body->eadatasize - 1, symlen - 1); ll_get_fsname(inode->i_sb, NULL, 0),
PFID(ll_inode2fid(inode)), body->eadatasize - 1,
symlen - 1);
rc = -EPROTO; rc = -EPROTO;
goto failed; goto failed;
} }
......
...@@ -532,15 +532,14 @@ static void vvp_pgcache_page_show(const struct lu_env *env, ...@@ -532,15 +532,14 @@ static void vvp_pgcache_page_show(const struct lu_env *env,
vpg = cl2vvp_page(cl_page_at(page, &vvp_device_type)); vpg = cl2vvp_page(cl_page_at(page, &vvp_device_type));
vmpage = vpg->vpg_page; vmpage = vpg->vpg_page;
seq_printf(seq, " %5i | %p %p %s %s %s %s | %p %lu/%u(%p) %lu %u [", seq_printf(seq, " %5i | %p %p %s %s %s %s | %p "DFID"(%p) %lu %u [",
0 /* gen */, 0 /* gen */,
vpg, page, vpg, page,
"none", "none",
vpg->vpg_write_queued ? "wq" : "- ", vpg->vpg_write_queued ? "wq" : "- ",
vpg->vpg_defer_uptodate ? "du" : "- ", vpg->vpg_defer_uptodate ? "du" : "- ",
PageWriteback(vmpage) ? "wb" : "-", PageWriteback(vmpage) ? "wb" : "-",
vmpage, vmpage->mapping->host->i_ino, vmpage, PFID(ll_inode2fid(vmpage->mapping->host)),
vmpage->mapping->host->i_generation,
vmpage->mapping->host, vmpage->index, vmpage->mapping->host, vmpage->index,
page_count(vmpage)); page_count(vmpage));
has_flags = 0; has_flags = 0;
......
...@@ -219,8 +219,8 @@ int ll_setxattr(struct dentry *dentry, const char *name, ...@@ -219,8 +219,8 @@ int ll_setxattr(struct dentry *dentry, const char *name,
LASSERT(inode); LASSERT(inode);
LASSERT(name); LASSERT(name);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), xattr %s\n",
inode->i_ino, inode->i_generation, inode, name); PFID(ll_inode2fid(inode)), inode, name);
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_SETXATTR, 1); ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_SETXATTR, 1);
...@@ -273,8 +273,8 @@ int ll_removexattr(struct dentry *dentry, const char *name) ...@@ -273,8 +273,8 @@ int ll_removexattr(struct dentry *dentry, const char *name)
LASSERT(inode); LASSERT(inode);
LASSERT(name); LASSERT(name);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), xattr %s\n",
inode->i_ino, inode->i_generation, inode, name); PFID(ll_inode2fid(inode)), inode, name);
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_REMOVEXATTR, 1); ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_REMOVEXATTR, 1);
return ll_setxattr_common(inode, name, NULL, 0, 0, return ll_setxattr_common(inode, name, NULL, 0, 0,
...@@ -293,8 +293,8 @@ int ll_getxattr_common(struct inode *inode, const char *name, ...@@ -293,8 +293,8 @@ int ll_getxattr_common(struct inode *inode, const char *name,
struct rmtacl_ctl_entry *rce = NULL; struct rmtacl_ctl_entry *rce = NULL;
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
inode->i_ino, inode->i_generation, inode); PFID(ll_inode2fid(inode)), inode);
/* listxattr have slightly different behavior from of ext3: /* listxattr have slightly different behavior from of ext3:
* without 'user_xattr' ext3 will list all xattr names but * without 'user_xattr' ext3 will list all xattr names but
...@@ -458,8 +458,8 @@ ssize_t ll_getxattr(struct dentry *dentry, const char *name, ...@@ -458,8 +458,8 @@ ssize_t ll_getxattr(struct dentry *dentry, const char *name,
LASSERT(inode); LASSERT(inode);
LASSERT(name); LASSERT(name);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), xattr %s\n",
inode->i_ino, inode->i_generation, inode, name); PFID(ll_inode2fid(inode)), inode, name);
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR, 1); ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR, 1);
...@@ -553,8 +553,8 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size) ...@@ -553,8 +553,8 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
LASSERT(inode); LASSERT(inode);
CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
inode->i_ino, inode->i_generation, inode); PFID(ll_inode2fid(inode)), inode);
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LISTXATTR, 1); ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LISTXATTR, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment