Merge PR #21972 into master

* refs/pull/21972/head:
	client: increase verbosity level for log messages in helper methods

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
Patrick Donnelly 2018-05-18 14:31:03 -07:00
commit 6a6add587b
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB

View File

@ -3766,7 +3766,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);
@ -5180,7 +5180,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;
}
@ -6058,7 +6058,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;
}
@ -7439,7 +7439,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;
}
@ -8243,7 +8243,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;
@ -8260,7 +8260,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;
}
@ -8277,7 +8277,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;
@ -8285,13 +8285,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;
}
@ -8306,12 +8306,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;
}
@ -8386,7 +8386,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);
@ -8480,7 +8480,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);
@ -8618,7 +8618,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;
}
@ -9398,14 +9398,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();
}
@ -9419,7 +9419,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"));
@ -9466,7 +9466,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;
}
@ -9475,7 +9475,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);
}
@ -9495,7 +9495,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;
}
@ -10479,7 +10479,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;
@ -10566,7 +10566,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;
@ -10616,7 +10616,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;
@ -10926,7 +10926,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;
}
@ -11008,7 +11008,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;
}
@ -11265,7 +11265,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;
}
@ -11563,7 +11563,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;
@ -11606,7 +11606,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:
@ -11699,7 +11699,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)
@ -11775,7 +11775,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
@ -11791,7 +11791,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;
@ -11836,7 +11836,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:
@ -11925,7 +11925,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;
@ -11959,7 +11959,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;
@ -12047,7 +12047,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;
@ -12087,7 +12087,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:
@ -12121,7 +12121,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) {
@ -12164,7 +12164,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:
@ -12199,7 +12199,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;
@ -12296,7 +12296,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:
@ -12339,7 +12339,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)
@ -12374,7 +12374,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:
@ -12622,7 +12622,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;
@ -12693,7 +12693,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;