From e276fdaaa8b737ea845e19388796796ca30d2162 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Mon, 14 May 2018 07:38:47 +0000 Subject: [PATCH] client: increase verbosity level for log messages in helper methods Fixes: http://tracker.ceph.com/issues/21014 Signed-off-by: Rishabh Dave --- src/client/Client.cc | 88 ++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 131f80ce451..aa4fae7f894 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -3762,7 +3762,7 @@ bool Client::_flush(Inode *in, Context *onfinish) } if (objecter->osdmap_pool_full(in->layout.pool_id)) { - ldout(cct, 1) << __func__ << ": FULL, purging for ENOSPC" << dendl; + ldout(cct, 8) << __func__ << ": FULL, purging for ENOSPC" << dendl; objectcacher->purge_set(&in->oset); if (onfinish) { onfinish->complete(-ENOSPC); @@ -5168,7 +5168,7 @@ int Client::xattr_permission(Inode *in, const char *name, unsigned want, r = inode_permission(in, perms, want); } out: - ldout(cct, 3) << __func__ << " " << in << " = " << r << dendl; + ldout(cct, 5) << __func__ << " " << in << " = " << r << dendl; return r; } @@ -6046,7 +6046,7 @@ int Client::_lookup(Inode *dir, const string& dname, int mask, InodeRef *target, Inode *tempino = tmptarget.get(); _ll_get(tempino); *target = tempino; - ldout(cct, 3) << __func__ << " found target " << (*target)->ino << dendl; + ldout(cct, 8) << __func__ << " found target " << (*target)->ino << dendl; } else { *target = dir; } @@ -7427,7 +7427,7 @@ int Client::_opendir(Inode *in, dir_result_t **dirpp, const UserPerm& perms) return -ENOTDIR; *dirpp = new dir_result_t(in, perms); opened_dirs.insert(*dirpp); - ldout(cct, 3) << __func__ << "(" << in->ino << ") = " << 0 << " (" << *dirpp << ")" << dendl; + ldout(cct, 8) << __func__ << "(" << in->ino << ") = " << 0 << " (" << *dirpp << ")" << dendl; return 0; } @@ -8230,7 +8230,7 @@ int Client::lookup_hash(inodeno_t ino, inodeno_t dirino, const char *name, */ int Client::_lookup_ino(inodeno_t ino, const UserPerm& perms, Inode **inode) { - ldout(cct, 3) << __func__ << " enter(" << ino << ")" << dendl; + ldout(cct, 8) << __func__ << " enter(" << ino << ")" << dendl; if (unmounting) return -ENOTCONN; @@ -8247,7 +8247,7 @@ int Client::_lookup_ino(inodeno_t ino, const UserPerm& perms, Inode **inode) *inode = p->second; _ll_get(*inode); } - ldout(cct, 3) << __func__ << " exit(" << ino << ") = " << r << dendl; + ldout(cct, 8) << __func__ << " exit(" << ino << ") = " << r << dendl; return r; } @@ -8264,7 +8264,7 @@ int Client::lookup_ino(inodeno_t ino, const UserPerm& perms, Inode **inode) */ int Client::_lookup_parent(Inode *ino, const UserPerm& perms, Inode **parent) { - ldout(cct, 3) << __func__ << " enter(" << ino->ino << ")" << dendl; + ldout(cct, 8) << __func__ << " enter(" << ino->ino << ")" << dendl; if (unmounting) return -ENOTCONN; @@ -8272,13 +8272,13 @@ int Client::_lookup_parent(Inode *ino, const UserPerm& perms, Inode **parent) if (!ino->dentries.empty()) { // if we exposed the parent here, we'd need to check permissions, // but right now we just rely on the MDS doing so in make_request - ldout(cct, 3) << __func__ << " dentry already present" << dendl; + ldout(cct, 8) << __func__ << " dentry already present" << dendl; return 0; } if (ino->is_root()) { *parent = NULL; - ldout(cct, 3) << "ino is root, no parent" << dendl; + ldout(cct, 8) << "ino is root, no parent" << dendl; return -EINVAL; } @@ -8293,12 +8293,12 @@ int Client::_lookup_parent(Inode *ino, const UserPerm& perms, Inode **parent) if (r == 0) { *parent = target.get(); _ll_get(*parent); - ldout(cct, 3) << __func__ << " found parent " << (*parent)->ino << dendl; + ldout(cct, 8) << __func__ << " found parent " << (*parent)->ino << dendl; } else { *parent = NULL; } } - ldout(cct, 3) << __func__ << " exit(" << ino->ino << ") = " << r << dendl; + ldout(cct, 8) << __func__ << " exit(" << ino->ino << ") = " << r << dendl; return r; } @@ -8373,7 +8373,7 @@ int Client::_release_fh(Fh *f) //ldout(cct, 3) << "op: client->close(open_files[ " << fh << " ]);" << dendl; //ldout(cct, 3) << "op: open_files.erase( " << fh << " );" << dendl; Inode *in = f->inode.get(); - ldout(cct, 5) << __func__ << " " << f << " mode " << f->mode << " on " << *in << dendl; + ldout(cct, 8) << __func__ << " " << f << " mode " << f->mode << " on " << *in << dendl; in->unset_deleg(f); @@ -8467,7 +8467,7 @@ int Client::_open(Inode *in, int flags, mode_t mode, Fh **fhp, result = get_caps(in, need, want, &have, -1); if (result < 0) { - ldout(cct, 1) << "Unable to get caps after open of inode " << *in << + ldout(cct, 8) << "Unable to get caps after open of inode " << *in << " . Denying open: " << cpp_strerror(result) << dendl; in->put_open_ref(cmode); @@ -8605,7 +8605,7 @@ loff_t Client::_lseek(Fh *f, loff_t offset, int whence) f->pos = pos; } - ldout(cct, 3) << "_lseek(" << f << ", " << offset << ", " << whence << ") = " << f->pos << dendl; + ldout(cct, 8) << "_lseek(" << f << ", " << offset << ", " << whence << ") = " << f->pos << dendl; return f->pos; } @@ -9385,14 +9385,14 @@ int Client::fsync(int fd, bool syncdataonly) // The IOs in this fsync were okay, but maybe something happened // in the background that we shoudl be reporting? r = f->take_async_err(); - ldout(cct, 3) << "fsync(" << fd << ", " << syncdataonly + ldout(cct, 5) << "fsync(" << fd << ", " << syncdataonly << ") = 0, async_err = " << r << dendl; } else { // Assume that an error we encountered during fsync, even reported // synchronously, would also have applied the error to the Fh, and we // should clear it here to avoid returning the same error again on next // call. - ldout(cct, 3) << "fsync(" << fd << ", " << syncdataonly << ") = " + ldout(cct, 5) << "fsync(" << fd << ", " << syncdataonly << ") = " << r << dendl; f->take_async_err(); } @@ -9406,7 +9406,7 @@ int Client::_fsync(Inode *in, bool syncdataonly) ceph_tid_t flush_tid = 0; InodeRef tmp_ref; - ldout(cct, 3) << "_fsync on " << *in << " " << (syncdataonly ? "(dataonly)":"(data+metadata)") << dendl; + ldout(cct, 8) << "_fsync on " << *in << " " << (syncdataonly ? "(dataonly)":"(data+metadata)") << dendl; if (cct->_conf->client_oc) { object_cacher_completion.reset(new C_SaferCond("Client::_fsync::lock")); @@ -9453,7 +9453,7 @@ int Client::_fsync(Inode *in, bool syncdataonly) ldout(cct, 10) << "ino " << in->ino << " has no uncommitted writes" << dendl; } else { - ldout(cct, 1) << "ino " << in->ino << " failed to commit to disk! " + ldout(cct, 8) << "ino " << in->ino << " failed to commit to disk! " << cpp_strerror(-r) << dendl; } @@ -9462,7 +9462,7 @@ int Client::_fsync(Inode *in, bool syncdataonly) int Client::_fsync(Fh *f, bool syncdataonly) { - ldout(cct, 3) << "_fsync(" << f << ", " << (syncdataonly ? "dataonly)":"data+metadata)") << dendl; + ldout(cct, 8) << "_fsync(" << f << ", " << (syncdataonly ? "dataonly)":"data+metadata)") << dendl; return _fsync(f->inode.get(), syncdataonly); } @@ -9482,7 +9482,7 @@ int Client::fstat(int fd, struct stat *stbuf, const UserPerm& perms, int mask) if (r < 0) return r; fill_stat(f->inode, stbuf, NULL); - ldout(cct, 3) << "fstat(" << fd << ", " << stbuf << ") = " << r << dendl; + ldout(cct, 5) << "fstat(" << fd << ", " << stbuf << ") = " << r << dendl; return r; } @@ -10466,7 +10466,7 @@ bool Client::_ll_forget(Inode *in, int count) { inodeno_t ino = in->ino; - ldout(cct, 3) << __func__ << " " << ino << " " << count << dendl; + ldout(cct, 8) << __func__ << " " << ino << " " << count << dendl; tout(cct) << __func__ << std::endl; tout(cct) << ino.val << std::endl; tout(cct) << count << std::endl; @@ -10553,7 +10553,7 @@ int Client::_ll_getattr(Inode *in, int caps, const UserPerm& perms) { vinodeno_t vino = _get_vino(in); - ldout(cct, 3) << __func__ << " " << vino << dendl; + ldout(cct, 8) << __func__ << " " << vino << dendl; tout(cct) << __func__ << std::endl; tout(cct) << vino.ino.val << std::endl; @@ -10603,7 +10603,7 @@ int Client::_ll_setattrx(Inode *in, struct ceph_statx *stx, int mask, { vinodeno_t vino = _get_vino(in); - ldout(cct, 3) << __func__ << " " << vino << " mask " << hex << mask << dec + ldout(cct, 8) << __func__ << " " << vino << " mask " << hex << mask << dec << dendl; tout(cct) << __func__ << std::endl; tout(cct) << vino.ino.val << std::endl; @@ -10913,7 +10913,7 @@ int Client::_getxattr(Inode *in, const char *name, void *value, size_t size, } } out: - ldout(cct, 3) << "_getxattr(" << in->ino << ", \"" << name << "\", " << size << ") = " << r << dendl; + ldout(cct, 8) << "_getxattr(" << in->ino << ", \"" << name << "\", " << size << ") = " << r << dendl; return r; } @@ -10995,7 +10995,7 @@ int Client::_listxattr(Inode *in, char *name, size_t size, r = -ERANGE; } } - ldout(cct, 3) << __func__ << "(" << in->ino << ", " << size << ") = " << r << dendl; + ldout(cct, 8) << __func__ << "(" << in->ino << ", " << size << ") = " << r << dendl; return r; } @@ -11252,7 +11252,7 @@ int Client::_removexattr(Inode *in, const char *name, const UserPerm& perms) int res = make_request(req, perms); trim_cache(); - ldout(cct, 3) << "_removexattr(" << in->ino << ", \"" << name << "\") = " << res << dendl; + ldout(cct, 8) << "_removexattr(" << in->ino << ", \"" << name << "\") = " << res << dendl; return res; } @@ -11550,7 +11550,7 @@ int Client::ll_readlink(Inode *in, char *buf, size_t buflen, const UserPerm& per int Client::_mknod(Inode *dir, const char *name, mode_t mode, dev_t rdev, const UserPerm& perms, InodeRef *inp) { - ldout(cct, 3) << "_mknod(" << dir->ino << " " << name << ", 0" << oct + ldout(cct, 8) << "_mknod(" << dir->ino << " " << name << ", 0" << oct << mode << dec << ", " << rdev << ", uid " << perms.uid() << ", gid " << perms.gid() << ")" << dendl; @@ -11593,7 +11593,7 @@ int Client::_mknod(Inode *dir, const char *name, mode_t mode, dev_t rdev, trim_cache(); - ldout(cct, 3) << "mknod(" << path << ", 0" << oct << mode << dec << ") = " << res << dendl; + ldout(cct, 8) << "mknod(" << path << ", 0" << oct << mode << dec << ") = " << res << dendl; return res; fail: @@ -11686,7 +11686,7 @@ int Client::_create(Inode *dir, const char *name, int flags, mode_t mode, int object_size, const char *data_pool, bool *created, const UserPerm& perms) { - ldout(cct, 3) << "_create(" << dir->ino << " " << name << ", 0" << oct << + ldout(cct, 8) << "_create(" << dir->ino << " " << name << ", 0" << oct << mode << dec << ")" << dendl; if (strlen(name) > NAME_MAX) @@ -11762,7 +11762,7 @@ int Client::_create(Inode *dir, const char *name, int flags, mode_t mode, reply_error: trim_cache(); - ldout(cct, 3) << "create(" << path << ", 0" << oct << mode << dec + ldout(cct, 8) << "create(" << path << ", 0" << oct << mode << dec << " layout " << stripe_unit << ' ' << stripe_count << ' ' << object_size @@ -11778,7 +11778,7 @@ int Client::_create(Inode *dir, const char *name, int flags, mode_t mode, int Client::_mkdir(Inode *dir, const char *name, mode_t mode, const UserPerm& perm, InodeRef *inp) { - ldout(cct, 3) << "_mkdir(" << dir->ino << " " << name << ", 0" << oct + ldout(cct, 8) << "_mkdir(" << dir->ino << " " << name << ", 0" << oct << mode << dec << ", uid " << perm.uid() << ", gid " << perm.gid() << ")" << dendl; @@ -11823,7 +11823,7 @@ int Client::_mkdir(Inode *dir, const char *name, mode_t mode, const UserPerm& pe trim_cache(); - ldout(cct, 3) << "_mkdir(" << path << ", 0" << oct << mode << dec << ") = " << res << dendl; + ldout(cct, 8) << "_mkdir(" << path << ", 0" << oct << mode << dec << ") = " << res << dendl; return res; fail: @@ -11912,7 +11912,7 @@ int Client::ll_mkdirx(Inode *parent, const char *name, mode_t mode, Inode **out, int Client::_symlink(Inode *dir, const char *name, const char *target, const UserPerm& perms, InodeRef *inp) { - ldout(cct, 3) << "_symlink(" << dir->ino << " " << name << ", " << target + ldout(cct, 8) << "_symlink(" << dir->ino << " " << name << ", " << target << ", uid " << perms.uid() << ", gid " << perms.gid() << ")" << dendl; @@ -11946,7 +11946,7 @@ int Client::_symlink(Inode *dir, const char *name, const char *target, res = make_request(req, perms, inp); trim_cache(); - ldout(cct, 3) << "_symlink(\"" << path << "\", \"" << target << "\") = " << + ldout(cct, 8) << "_symlink(\"" << path << "\", \"" << target << "\") = " << res << dendl; return res; @@ -12034,7 +12034,7 @@ int Client::ll_symlinkx(Inode *parent, const char *name, const char *value, int Client::_unlink(Inode *dir, const char *name, const UserPerm& perm) { - ldout(cct, 3) << "_unlink(" << dir->ino << " " << name + ldout(cct, 8) << "_unlink(" << dir->ino << " " << name << " uid " << perm.uid() << " gid " << perm.gid() << ")" << dendl; @@ -12074,7 +12074,7 @@ int Client::_unlink(Inode *dir, const char *name, const UserPerm& perm) res = make_request(req, perm); trim_cache(); - ldout(cct, 3) << "unlink(" << path << ") = " << res << dendl; + ldout(cct, 8) << "unlink(" << path << ") = " << res << dendl; return res; fail: @@ -12108,7 +12108,7 @@ int Client::ll_unlink(Inode *in, const char *name, const UserPerm& perm) int Client::_rmdir(Inode *dir, const char *name, const UserPerm& perms) { - ldout(cct, 3) << "_rmdir(" << dir->ino << " " << name << " uid " + ldout(cct, 8) << "_rmdir(" << dir->ino << " " << name << " uid " << perms.uid() << " gid " << perms.gid() << ")" << dendl; if (dir->snapid != CEPH_NOSNAP && dir->snapid != CEPH_SNAPDIR) { @@ -12151,7 +12151,7 @@ int Client::_rmdir(Inode *dir, const char *name, const UserPerm& perms) res = make_request(req, perms); trim_cache(); - ldout(cct, 3) << "rmdir(" << path << ") = " << res << dendl; + ldout(cct, 8) << "rmdir(" << path << ") = " << res << dendl; return res; fail: @@ -12186,7 +12186,7 @@ int Client::ll_rmdir(Inode *in, const char *name, const UserPerm& perms) int Client::_rename(Inode *fromdir, const char *fromname, Inode *todir, const char *toname, const UserPerm& perm) { - ldout(cct, 3) << "_rename(" << fromdir->ino << " " << fromname << " to " + ldout(cct, 8) << "_rename(" << fromdir->ino << " " << fromname << " to " << todir->ino << " " << toname << " uid " << perm.uid() << " gid " << perm.gid() << ")" << dendl; @@ -12283,7 +12283,7 @@ int Client::_rename(Inode *fromdir, const char *fromname, Inode *todir, const ch // renamed item from our cache trim_cache(); - ldout(cct, 3) << "_rename(" << from << ", " << to << ") = " << res << dendl; + ldout(cct, 8) << "_rename(" << from << ", " << to << ") = " << res << dendl; return res; fail: @@ -12326,7 +12326,7 @@ int Client::ll_rename(Inode *parent, const char *name, Inode *newparent, int Client::_link(Inode *in, Inode *dir, const char *newname, const UserPerm& perm, InodeRef *inp) { - ldout(cct, 3) << "_link(" << in->ino << " to " << dir->ino << " " << newname + ldout(cct, 8) << "_link(" << in->ino << " to " << dir->ino << " " << newname << " uid " << perm.uid() << " gid " << perm.gid() << ")" << dendl; if (strlen(newname) > NAME_MAX) @@ -12361,7 +12361,7 @@ int Client::_link(Inode *in, Inode *dir, const char *newname, const UserPerm& pe ldout(cct, 10) << "link result is " << res << dendl; trim_cache(); - ldout(cct, 3) << "link(" << existing << ", " << path << ") = " << res << dendl; + ldout(cct, 8) << "link(" << existing << ", " << path << ") = " << res << dendl; return res; fail: @@ -12609,7 +12609,7 @@ int Client::_ll_create(Inode *parent, const char *name, mode_t mode, vinodeno_t vparent = _get_vino(parent); - ldout(cct, 3) << "_ll_create " << vparent << " " << name << " 0" << oct << + ldout(cct, 8) << "_ll_create " << vparent << " " << name << " 0" << oct << mode << dec << " " << ceph_flags_sys2wire(flags) << ", uid " << perms.uid() << ", gid " << perms.gid() << dendl; tout(cct) << "ll_create" << std::endl; @@ -12680,7 +12680,7 @@ out: tout(cct) << (unsigned long)*fhp << std::endl; tout(cct) << ino << std::endl; - ldout(cct, 3) << "_ll_create " << vparent << " " << name << " 0" << oct << + ldout(cct, 8) << "_ll_create " << vparent << " " << name << " 0" << oct << mode << dec << " " << ceph_flags_sys2wire(flags) << " = " << r << " (" << *fhp << " " << hex << ino << dec << ")" << dendl;