vino = faked_ino_map[ino];
else
vino = vinodeno_t(0, CEPH_NOSNAP);
- ldout(cct, 10) << "map_faked_ino " << ino << " -> " << vino << dendl;
+ ldout(cct, 10) << __func__ << " " << ino << " -> " << vino << dendl;
return vino;
}
it != fd_map.end();
++it) {
Fh *fh = it->second;
- ldout(cct, 1) << "tear_down_cache forcing close of fh " << it->first << " ino " << fh->inode->ino << dendl;
+ ldout(cct, 1) << __func__ << " forcing close of fh " << it->first << " ino " << fh->inode->ino << dendl;
_release_fh(fh);
}
fd_map.clear();
while (!opened_dirs.empty()) {
dir_result_t *dirp = *opened_dirs.begin();
- ldout(cct, 1) << "tear_down_cache forcing close of dir " << dirp << " ino " << dirp->inode->ino << dendl;
+ ldout(cct, 1) << __func__ << " forcing close of dir " << dirp << " ino " << dirp->inode->ino << dendl;
_closedir(dirp);
}
{
set<Inode*> did;
- ldout(cct, 1) << "dump_cache" << dendl;
+ ldout(cct, 1) << __func__ << dendl;
if (f)
f->open_array_section("cache");
void Client::shutdown()
{
- ldout(cct, 1) << "shutdown" << dendl;
+ ldout(cct, 1) << __func__ << dendl;
// If we were not mounted, but were being used for sending
// MDS commands, we may have sessions that need closing.
void Client::trim_cache_for_reconnect(MetaSession *s)
{
mds_rank_t mds = s->mds_num;
- ldout(cct, 20) << "trim_cache_for_reconnect mds." << mds << dendl;
+ ldout(cct, 20) << __func__ << " mds." << mds << dendl;
int trimmed = 0;
list<Dentry*> skipped;
for(list<Dentry*>::iterator p = skipped.begin(); p != skipped.end(); ++p)
lru.lru_insert_mid(*p);
- ldout(cct, 20) << "trim_cache_for_reconnect mds." << mds
+ ldout(cct, 20) << __func__ << " mds." << mds
<< " trimmed " << trimmed << " dentries" << dendl;
if (s->caps.size() > 0)
int issued)
{
bool warn = false;
- ldout(cct, 10) << "update_inode_file_bits " << *in << " " << ccap_string(issued)
+ ldout(cct, 10) << __func__ << " " << *in << " " << ccap_string(issued)
<< " mtime " << mtime << dendl;
ldout(cct, 25) << "truncate_seq: mds " << truncate_seq << " local "
<< in->truncate_seq << " time_warp_seq: mds " << time_warp_seq
bool was_new = false;
if (inode_map.count(st->vino)) {
in = inode_map[st->vino];
- ldout(cct, 12) << "add_update_inode had " << *in << " caps " << ccap_string(st->cap.caps) << dendl;
+ ldout(cct, 12) << __func__ << " had " << *in << " caps " << ccap_string(st->cap.caps) << dendl;
} else {
in = new Inode(this, st->vino, &st->layout);
inode_map[st->vino] = in;
in->symlink = st->symlink;
if (was_new)
- ldout(cct, 12) << "add_update_inode adding " << *in << " caps " << ccap_string(st->cap.caps) << dendl;
+ ldout(cct, 12) << __func__ << " adding " << *in << " caps " << ccap_string(st->cap.caps) << dendl;
if (!st->cap.caps)
return in; // as with readdir returning indoes in different snaprealms (no caps!)
if (dir->dentries.count(dname))
dn = dir->dentries[dname];
- ldout(cct, 12) << "insert_dentry_inode '" << dname << "' vino " << in->vino()
+ ldout(cct, 12) << __func__ << " '" << dname << "' vino " << in->vino()
<< " in dir " << dir->parent_inode->vino() << " dn " << dn
<< dendl;
if (req->resend_mds >= 0) {
mds = req->resend_mds;
req->resend_mds = -1;
- ldout(cct, 10) << "choose_target_mds resend_mds specified as mds." << mds << dendl;
+ ldout(cct, 10) << __func__ << " resend_mds specified as mds." << mds << dendl;
goto out;
}
in = req->inode();
de = req->dentry();
if (in) {
- ldout(cct, 20) << "choose_target_mds starting with req->inode " << *in << dendl;
+ ldout(cct, 20) << __func__ << " starting with req->inode " << *in << dendl;
if (req->path.depth()) {
hash = in->hash_dentry_name(req->path[0]);
- ldout(cct, 20) << "choose_target_mds inode dir hash is " << (int)in->dir_layout.dl_dir_hash
+ ldout(cct, 20) << __func__ << " inode dir hash is " << (int)in->dir_layout.dl_dir_hash
<< " on " << req->path[0]
<< " => " << hash << dendl;
is_hash = true;
} else if (de) {
if (de->inode) {
in = de->inode.get();
- ldout(cct, 20) << "choose_target_mds starting with req->dentry inode " << *in << dendl;
+ ldout(cct, 20) << __func__ << " starting with req->dentry inode " << *in << dendl;
} else {
in = de->dir->parent_inode;
hash = in->hash_dentry_name(de->name);
- ldout(cct, 20) << "choose_target_mds dentry dir hash is " << (int)in->dir_layout.dl_dir_hash
+ ldout(cct, 20) << __func__ << " dentry dir hash is " << (int)in->dir_layout.dl_dir_hash
<< " on " << de->name
<< " => " << hash << dendl;
is_hash = true;
}
if (in) {
if (in->snapid != CEPH_NOSNAP) {
- ldout(cct, 10) << "choose_target_mds " << *in << " is snapped, using nonsnap parent" << dendl;
+ ldout(cct, 10) << __func__ << " " << *in << " is snapped, using nonsnap parent" << dendl;
while (in->snapid != CEPH_NOSNAP) {
if (in->snapid == CEPH_SNAPDIR)
in = in->snapdir_parent.get();
is_hash = false;
}
- ldout(cct, 20) << "choose_target_mds " << *in << " is_hash=" << is_hash
+ ldout(cct, 20) << __func__ << " " << *in << " is_hash=" << is_hash
<< " hash=" << hash << dendl;
if (is_hash && S_ISDIR(in->mode) && !in->fragmap.empty()) {
mds = in->fragmap[fg];
if (phash_diri)
*phash_diri = in;
- ldout(cct, 10) << "choose_target_mds from dirfragtree hash" << dendl;
+ ldout(cct, 10) << __func__ << " from dirfragtree hash" << dendl;
goto out;
}
}
} else {
goto random_mds;
}
- ldout(cct, 10) << "choose_target_mds from caps on inode " << *in << dendl;
+ ldout(cct, 10) << __func__ << " from caps on inode " << *in << dendl;
goto out;
}
void Client::connect_mds_targets(mds_rank_t mds)
{
- ldout(cct, 10) << "connect_mds_targets for mds." << mds << dendl;
+ ldout(cct, 10) << __func__ << " for mds." << mds << dendl;
assert(mds_sessions.count(mds));
const MDSMap::mds_info_t& info = mdsmap->get_mds_info(mds);
for (set<mds_rank_t>::const_iterator q = info.export_targets.begin();
mds_rank_t mds, int drop,
int unless, int force)
{
- ldout(cct, 20) << "encode_inode_release enter(in:" << *in << ", req:" << req
+ ldout(cct, 20) << __func__ << " enter(in:" << *in << ", req:" << req
<< " mds:" << mds << ", drop:" << drop << ", unless:" << unless
<< ", have:" << ", force:" << force << ")" << dendl;
int released = 0;
req->cap_releases.push_back(MClientRequest::Release(rel,""));
}
}
- ldout(cct, 25) << "encode_inode_release exit(in:" << *in << ") released:"
+ ldout(cct, 25) << __func__ << " exit(in:" << *in << ") released:"
<< released << dendl;
return released;
}
void Client::encode_dentry_release(Dentry *dn, MetaRequest *req,
mds_rank_t mds, int drop, int unless)
{
- ldout(cct, 20) << "encode_dentry_release enter(dn:"
+ ldout(cct, 20) << __func__ << " enter(dn:"
<< dn << ")" << dendl;
int released = 0;
if (dn->dir)
rel.item.dname_seq = dn->lease_seq;
rel.dname = dn->name;
}
- ldout(cct, 25) << "encode_dentry_release exit(dn:"
+ ldout(cct, 25) << __func__ << " exit(dn:"
<< dn << ")" << dendl;
}
*/
void Client::encode_cap_releases(MetaRequest *req, mds_rank_t mds)
{
- ldout(cct, 20) << "encode_cap_releases enter (req: "
+ ldout(cct, 20) << __func__ << " enter (req: "
<< req << ", mds: " << mds << ")" << dendl;
if (req->inode_drop && req->inode())
encode_inode_release(req->inode(), req,
encode_dentry_release(req->old_dentry(), req,
mds, req->old_dentry_drop,
req->old_dentry_unless);
- ldout(cct, 25) << "encode_cap_releases exit (req: "
+ ldout(cct, 25) << __func__ << " exit (req: "
<< req << ", mds " << mds <<dendl;
}
MetaSession *Client::_open_mds_session(mds_rank_t mds)
{
- ldout(cct, 10) << "_open_mds_session mds." << mds << dendl;
+ ldout(cct, 10) << __func__ << " mds." << mds << dendl;
entity_inst_t inst = mdsmap->get_inst(mds);
auto em = mds_sessions.emplace(std::piecewise_construct,
std::forward_as_tuple(mds),
// has previously sent us a REJECT.
if (rejected_by_mds.count(mds)) {
if (rejected_by_mds[mds] == session->inst) {
- ldout(cct, 4) << "_open_mds_session mds." << mds << " skipping "
+ ldout(cct, 4) << __func__ << " mds." << mds << " skipping "
"because we were rejected" << dendl;
return session;
} else {
- ldout(cct, 4) << "_open_mds_session mds." << mds << " old inst "
+ ldout(cct, 4) << __func__ << " mds." << mds << " old inst "
"rejected us, trying with new inst" << dendl;
rejected_by_mds.erase(mds);
}
void Client::_close_mds_session(MetaSession *s)
{
- ldout(cct, 2) << "_close_mds_session mds." << s->mds_num << " seq " << s->seq << dendl;
+ ldout(cct, 2) << __func__ << " mds." << s->mds_num << " seq " << s->seq << dendl;
s->state = MetaSession::STATE_CLOSING;
s->con->send_message(new MClientSession(CEPH_SESSION_REQUEST_CLOSE, s->seq));
}
void Client::handle_client_session(MClientSession *m)
{
mds_rank_t from = mds_rank_t(m->get_source().num());
- ldout(cct, 10) << "handle_client_session " << *m << " from mds." << from << dendl;
+ ldout(cct, 10) << __func__ << " " << *m << " from mds." << from << dendl;
MetaSession *session = _get_mds_session(from, m->get_connection().get());
if (!session) {
void Client::_kick_stale_sessions()
{
- ldout(cct, 1) << "kick_stale_sessions" << dendl;
+ ldout(cct, 1) << __func__ << dendl;
for (auto it = mds_sessions.begin(); it != mds_sessions.end(); ) {
MetaSession &s = it->second;
{
// make the request
mds_rank_t mds = session->mds_num;
- ldout(cct, 10) << "send_request rebuilding request " << request->get_tid()
+ ldout(cct, 10) << __func__ << " rebuilding request " << request->get_tid()
<< " for mds." << mds << dendl;
MClientRequest *r = build_client_request(request);
if (request->dentry()) {
if (request->mds == -1) {
request->sent_stamp = ceph_clock_now();
- ldout(cct, 20) << "send_request set sent_stamp to " << request->sent_stamp << dendl;
+ ldout(cct, 20) << __func__ << " set sent_stamp to " << request->sent_stamp << dendl;
}
request->mds = mds;
session->requests.push_back(&request->item);
- ldout(cct, 10) << "send_request " << *r << " to mds." << mds << dendl;
+ ldout(cct, 10) << __func__ << " " << *r << " to mds." << mds << dendl;
session->con->send_message(r);
}
ceph_tid_t tid = fwd->get_tid();
if (mds_requests.count(tid) == 0) {
- ldout(cct, 10) << "handle_client_request_forward no pending request on tid " << tid << dendl;
+ ldout(cct, 10) << __func__ << " no pending request on tid " << tid << dendl;
fwd->put();
return;
}
// request not forwarded, or dest mds has no session.
// resend.
- ldout(cct, 10) << "handle_client_request tid " << tid
+ ldout(cct, 10) << __func__ << " tid " << tid
<< " fwd " << fwd->get_num_fwd()
<< " to mds." << fwd->get_dest_mds()
<< ", resending to " << fwd->get_dest_mds()
bool is_safe = reply->is_safe();
if (mds_requests.count(tid) == 0) {
- lderr(cct) << "handle_client_reply no pending request on tid " << tid
+ lderr(cct) << __func__ << " no pending request on tid " << tid
<< " safe is:" << is_safe << dendl;
reply->put();
return;
}
MetaRequest *request = mds_requests.at(tid);
- ldout(cct, 20) << "handle_client_reply got a reply. Safe:" << is_safe
+ ldout(cct, 20) << __func__ << " got a reply. Safe:" << is_safe
<< " tid " << tid << dendl;
if (request->got_unsafe && !is_safe) {
request->dispatch_cond = &cond;
// wake up waiter
- ldout(cct, 20) << "handle_client_reply signalling caller " << (void*)request->caller_cond << dendl;
+ ldout(cct, 20) << __func__ << " signalling caller " << (void*)request->caller_cond << dendl;
request->caller_cond->Signal();
// wake for kick back
while (request->dispatch_cond) {
- ldout(cct, 20) << "handle_client_reply awaiting kickback on tid " << tid << " " << &cond << dendl;
+ ldout(cct, 20) << __func__ << " awaiting kickback on tid " << tid << " " << &cond << dendl;
cond.Wait(client_lock);
}
}
void Client::handle_mds_map(MMDSMap* m)
{
if (m->get_epoch() <= mdsmap->get_epoch()) {
- ldout(cct, 1) << "handle_mds_map epoch " << m->get_epoch()
+ ldout(cct, 1) << __func__ << " epoch " << m->get_epoch()
<< " is identical to or older than our "
<< mdsmap->get_epoch() << dendl;
m->put();
return;
}
- ldout(cct, 1) << "handle_mds_map epoch " << m->get_epoch() << dendl;
+ ldout(cct, 1) << __func__ << " epoch " << m->get_epoch() << dendl;
std::unique_ptr<MDSMap> oldmap(new MDSMap);
oldmap.swap(mdsmap);
void Client::send_reconnect(MetaSession *session)
{
mds_rank_t mds = session->mds_num;
- ldout(cct, 10) << "send_reconnect to mds." << mds << dendl;
+ ldout(cct, 10) << __func__ << " to mds." << mds << dendl;
// trim unused caps to reduce MDS's cache rejoin time
trim_cache_for_reconnect(session);
void Client::kick_requests(MetaSession *session)
{
- ldout(cct, 10) << "kick_requests for mds." << session->mds_num << dendl;
+ ldout(cct, 10) << __func__ << " for mds." << session->mds_num << dendl;
for (map<ceph_tid_t, MetaRequest*>::iterator p = mds_requests.begin();
p != mds_requests.end();
++p) {
void Client::kick_requests_closed(MetaSession *session)
{
- ldout(cct, 10) << "kick_requests_closed for mds." << session->mds_num << dendl;
+ ldout(cct, 10) << __func__ << " for mds." << session->mds_num << dendl;
for (map<ceph_tid_t, MetaRequest*>::iterator p = mds_requests.begin();
p != mds_requests.end(); ) {
MetaRequest *req = p->second;
}
req->item.remove_myself();
if (req->got_unsafe) {
- lderr(cct) << "kick_requests_closed removing unsafe request " << req->get_tid() << dendl;
+ lderr(cct) << __func__ << " removing unsafe request " << req->get_tid() << dendl;
req->unsafe_item.remove_myself();
req->unsafe_dir_item.remove_myself();
req->unsafe_target_item.remove_myself();
void Client::handle_lease(MClientLease *m)
{
- ldout(cct, 10) << "handle_lease " << *m << dendl;
+ ldout(cct, 10) << __func__ << " " << *m << dendl;
assert(m->get_action() == CEPH_MDS_LEASE_REVOKE);
void Client::put_inode(Inode *in, int n)
{
- ldout(cct, 10) << "put_inode on " << *in << dendl;
+ ldout(cct, 10) << __func__ << " on " << *in << dendl;
int left = in->_put(n);
if (left == 0) {
// release any caps
remove_all_caps(in);
- ldout(cct, 10) << "put_inode deleting " << *in << dendl;
+ ldout(cct, 10) << __func__ << " deleting " << *in << dendl;
bool unclean = objectcacher->release_set(&in->oset);
assert(!unclean);
inode_map.erase(in->vino());
void Client::close_dir(Dir *dir)
{
Inode *in = dir->parent_inode;
- ldout(cct, 15) << "close_dir dir " << dir << " on " << in << dendl;
+ ldout(cct, 15) << __func__ << " dir " << dir << " on " << in << dendl;
assert(dir->is_empty());
assert(in->dir == dir);
assert(in->dentries.size() < 2); // dirs can't be hard-linked
{
if ((cap & CEPH_CAP_FILE_BUFFER) &&
in->cap_refs[CEPH_CAP_FILE_BUFFER] == 0) {
- ldout(cct, 5) << "get_cap_ref got first FILE_BUFFER ref on " << *in << dendl;
+ ldout(cct, 5) << __func__ << " got first FILE_BUFFER ref on " << *in << dendl;
in->get();
}
if ((cap & CEPH_CAP_FILE_CACHE) &&
in->cap_refs[CEPH_CAP_FILE_CACHE] == 0) {
- ldout(cct, 5) << "get_cap_ref got first FILE_CACHE ref on " << *in << dendl;
+ ldout(cct, 5) << __func__ << " got first FILE_CACHE ref on " << *in << dendl;
in->get();
}
in->get_cap_ref(cap);
if ((last & CEPH_CAP_FILE_WR) &&
!in->cap_snaps.empty() &&
in->cap_snaps.rbegin()->second.writing) {
- ldout(cct, 10) << "put_cap_ref finishing pending cap_snap on " << *in << dendl;
+ ldout(cct, 10) << __func__ << " finishing pending cap_snap on " << *in << dendl;
in->cap_snaps.rbegin()->second.writing = 0;
finish_cap_snap(in, in->cap_snaps.rbegin()->second, get_caps_used(in));
signal_cond_list(in->waitfor_caps); // wake up blocked sync writers
for (auto &p : in->cap_snaps)
p.second.dirty_data = 0;
signal_cond_list(in->waitfor_commit);
- ldout(cct, 5) << "put_cap_ref dropped last FILE_BUFFER ref on " << *in << dendl;
+ ldout(cct, 5) << __func__ << " dropped last FILE_BUFFER ref on " << *in << dendl;
++put_nref;
}
}
if (last & CEPH_CAP_FILE_CACHE) {
- ldout(cct, 5) << "put_cap_ref dropped last FILE_CACHE ref on " << *in << dendl;
+ ldout(cct, 5) << __func__ << " dropped last FILE_CACHE ref on " << *in << dendl;
++put_nref;
}
if (drop)
int dropping = cap->issued & ~retain;
int op = CEPH_CAP_OP_UPDATE;
- ldout(cct, 10) << "send_cap " << *in
+ ldout(cct, 10) << __func__ << " " << *in
<< " mds." << session->mds_num << " seq " << cap->seq
<< (sync ? " sync " : " async ")
<< " used " << ccap_string(used)
retain |= CEPH_CAP_ANY_SHARED;
}
- ldout(cct, 10) << "check_caps on " << *in
+ ldout(cct, 10) << __func__ << " on " << *in
<< " wanted " << ccap_string(wanted)
<< " used " << ccap_string(used)
<< " issued " << ccap_string(issued)
{
int used = get_caps_used(in);
int dirty = in->caps_dirty();
- ldout(cct, 10) << "queue_cap_snap " << *in << " snapc " << old_snapc << " used " << ccap_string(used) << dendl;
+ ldout(cct, 10) << __func__ << " " << *in << " snapc " << old_snapc << " used " << ccap_string(used) << dendl;
if (in->cap_snaps.size() &&
in->cap_snaps.rbegin()->second.writing) {
- ldout(cct, 10) << "queue_cap_snap already have pending cap_snap on " << *in << dendl;
+ ldout(cct, 10) << __func__ << " already have pending cap_snap on " << *in << dendl;
return;
} else if (in->caps_dirty() ||
(used & CEPH_CAP_FILE_WR) ||
capsnap.xattr_version = in->xattr_version;
if (used & CEPH_CAP_FILE_WR) {
- ldout(cct, 10) << "queue_cap_snap WR used on " << *in << dendl;
+ ldout(cct, 10) << __func__ << " WR used on " << *in << dendl;
capsnap.writing = 1;
} else {
finish_cap_snap(in, capsnap, used);
}
} else {
- ldout(cct, 10) << "queue_cap_snap not dirty|writing on " << *in << dendl;
+ ldout(cct, 10) << __func__ << " not dirty|writing on " << *in << dendl;
}
}
void Client::finish_cap_snap(Inode *in, CapSnap &capsnap, int used)
{
- ldout(cct, 10) << "finish_cap_snap " << *in << " capsnap " << (void *)&capsnap << " used " << ccap_string(used) << dendl;
+ ldout(cct, 10) << __func__ << " " << *in << " capsnap " << (void *)&capsnap << " used " << ccap_string(used) << dendl;
capsnap.size = in->size;
capsnap.mtime = in->mtime;
capsnap.atime = in->atime;
}
if (used & CEPH_CAP_FILE_BUFFER) {
- ldout(cct, 10) << "finish_cap_snap " << *in << " cap_snap " << &capsnap << " used " << used
+ ldout(cct, 10) << __func__ << " " << *in << " cap_snap " << &capsnap << " used " << used
<< " WRBUFFER, delaying" << dendl;
} else {
capsnap.dirty_data = 0;
void Client::_flushed_cap_snap(Inode *in, snapid_t seq)
{
- ldout(cct, 10) << "_flushed_cap_snap seq " << seq << " on " << *in << dendl;
+ ldout(cct, 10) << __func__ << " seq " << seq << " on " << *in << dendl;
in->cap_snaps.at(seq).dirty_data = 0;
flush_snaps(in);
}
{
if (unmounting)
return;
- ldout(cct, 10) << "_async_invalidate " << ino << " " << off << "~" << len << dendl;
+ ldout(cct, 10) << __func__ << " " << ino << " " << off << "~" << len << dendl;
ino_invalidate_cb(callback_handle, ino, off, len);
}
void Client::_invalidate_inode_cache(Inode *in)
{
- ldout(cct, 10) << "_invalidate_inode_cache " << *in << dendl;
+ ldout(cct, 10) << __func__ << " " << *in << dendl;
// invalidate our userspace inode cache
if (cct->_conf->client_oc) {
void Client::_invalidate_inode_cache(Inode *in, int64_t off, int64_t len)
{
- ldout(cct, 10) << "_invalidate_inode_cache " << *in << " " << off << "~" << len << dendl;
+ ldout(cct, 10) << __func__ << " " << *in << " " << off << "~" << len << dendl;
// invalidate our userspace inode cache
if (cct->_conf->client_oc) {
assert(in->snaprealm == 0);
in->snaprealm = get_snap_realm(realm);
in->snaprealm->inodes_with_caps.push_back(&in->snaprealm_item);
- ldout(cct, 15) << "add_update_cap first one, opened snaprealm " << in->snaprealm << dendl;
+ ldout(cct, 15) << __func__ << " first one, opened snaprealm " << in->snaprealm << dendl;
}
mds_rank_t mds = mds_session->mds_num;
if (in->auth_cap != &cap &&
(!in->auth_cap || ceph_seq_cmp(in->auth_cap->mseq, mseq) < 0)) {
if (in->auth_cap && in->flushing_cap_item.is_on_list()) {
- ldout(cct, 10) << "add_update_cap changing auth cap: "
+ ldout(cct, 10) << __func__ << " changing auth cap: "
<< "add myself to new auth MDS' flushing caps list" << dendl;
adjust_session_flushing_caps(in, in->auth_cap->session, mds_session);
}
cap.issue_seq = seq;
cap.mseq = mseq;
cap.latest_perms = cap_perms;
- ldout(cct, 10) << "add_update_cap issued " << ccap_string(old_caps) << " -> " << ccap_string(cap.issued)
+ ldout(cct, 10) << __func__ << " issued " << ccap_string(old_caps) << " -> " << ccap_string(cap.issued)
<< " from mds." << mds
<< " on " << *in
<< dendl;
MetaSession *session = cap->session;
mds_rank_t mds = cap->session->mds_num;
- ldout(cct, 10) << "remove_cap mds." << mds << " on " << *in << dendl;
+ ldout(cct, 10) << __func__ << " mds." << mds << " on " << *in << dendl;
if (queue_release) {
session->enqueue_cap_release(
cap = nullptr;
if (!in->is_any_caps()) {
- ldout(cct, 15) << "remove_cap last one, closing snaprealm " << in->snaprealm << dendl;
+ ldout(cct, 15) << __func__ << " last one, closing snaprealm " << in->snaprealm << dendl;
in->snaprealm_item.remove_myself();
put_snap_realm(in->snaprealm);
in->snaprealm = 0;
void Client::remove_session_caps(MetaSession *s)
{
- ldout(cct, 10) << "remove_session_caps mds." << s->mds_num << dendl;
+ ldout(cct, 10) << __func__ << " mds." << s->mds_num << dendl;
while (s->caps.size()) {
Cap *cap = *s->caps.begin();
in->cap_snaps.clear();
}
if (dirty_caps) {
- lderr(cct) << "remove_session_caps still has dirty|flushing caps on " << *in << dendl;
+ lderr(cct) << __func__ << " still has dirty|flushing caps on " << *in << dendl;
if (in->flushing_caps) {
num_flushing_caps--;
in->flushing_cap_tids.clear();
{
mds_rank_t mds = s->mds_num;
size_t caps_size = s->caps.size();
- ldout(cct, 10) << "trim_caps mds." << mds << " max " << max
+ ldout(cct, 10) << __func__ << " mds." << mds << " max " << max
<< " caps " << caps_size << dendl;
uint64_t trimmed = 0;
in->flushing_cap_tids[flush_tid] = flushing;
if (!in->flushing_caps) {
- ldout(cct, 10) << "mark_caps_flushing " << ccap_string(flushing) << " " << *in << dendl;
+ ldout(cct, 10) << __func__ << " " << ccap_string(flushing) << " " << *in << dendl;
num_flushing_caps++;
} else {
- ldout(cct, 10) << "mark_caps_flushing (more) " << ccap_string(flushing) << " " << *in << dendl;
+ ldout(cct, 10) << __func__ << " (more) " << ccap_string(flushing) << " " << *in << dendl;
}
in->flushing_caps |= flushing;
void Client::flush_caps(Inode *in, MetaSession *session, bool sync)
{
- ldout(cct, 10) << "flush_caps " << in << " mds." << session->mds_num << dendl;
+ ldout(cct, 10) << __func__ << " " << in << " mds." << session->mds_num << dendl;
Cap *cap = in->auth_cap;
assert(cap->session == session);
assert(it != in->flushing_cap_tids.end());
if (it->first > want)
break;
- ldout(cct, 10) << "wait_sync_caps on " << *in << " flushing "
+ ldout(cct, 10) << __func__ << " on " << *in << " flushing "
<< ccap_string(it->second) << " want " << want
<< " last " << it->first << dendl;
wait_on_list(in->waitfor_caps);
void Client::wait_sync_caps(ceph_tid_t want)
{
retry:
- ldout(cct, 10) << "wait_sync_caps want " << want << " (last is " << last_flush_tid << ", "
+ ldout(cct, 10) << __func__ << " want " << want << " (last is " << last_flush_tid << ", "
<< num_flushing_caps << " total flushing)" << dendl;
for (auto &p : mds_sessions) {
MetaSession *s = &p.second;
void Client::kick_flushing_caps(MetaSession *session)
{
mds_rank_t mds = session->mds_num;
- ldout(cct, 10) << "kick_flushing_caps mds." << mds << dendl;
+ ldout(cct, 10) << __func__ << " mds." << mds << dendl;
for (xlist<Inode*>::iterator p = session->flushing_caps.begin(); !p.end(); ++p) {
Inode *in = *p;
realm = q.front();
q.pop_front();
- ldout(cct, 10) << "invalidate_snaprealm_and_children " << *realm << dendl;
+ ldout(cct, 10) << __func__ << " " << *realm << dendl;
realm->invalidate_cache();
for (set<SnapRealm*>::iterator p = realm->pchildren.begin();
SnapRealm *realm = snap_realms[r];
if (!realm)
snap_realms[r] = realm = new SnapRealm(r);
- ldout(cct, 20) << "get_snap_realm " << r << " " << realm << " " << realm->nref << " -> " << (realm->nref + 1) << dendl;
+ ldout(cct, 20) << __func__ << " " << r << " " << realm << " " << realm->nref << " -> " << (realm->nref + 1) << dendl;
realm->nref++;
return realm;
}
SnapRealm *Client::get_snap_realm_maybe(inodeno_t r)
{
if (snap_realms.count(r) == 0) {
- ldout(cct, 20) << "get_snap_realm_maybe " << r << " fail" << dendl;
+ ldout(cct, 20) << __func__ << " " << r << " fail" << dendl;
return NULL;
}
SnapRealm *realm = snap_realms[r];
- ldout(cct, 20) << "get_snap_realm_maybe " << r << " " << realm << " " << realm->nref << " -> " << (realm->nref + 1) << dendl;
+ ldout(cct, 20) << __func__ << " " << r << " " << realm << " " << realm->nref << " -> " << (realm->nref + 1) << dendl;
realm->nref++;
return realm;
}
void Client::put_snap_realm(SnapRealm *realm)
{
- ldout(cct, 20) << "put_snap_realm " << realm->ino << " " << realm
+ ldout(cct, 20) << __func__ << " " << realm->ino << " " << realm
<< " " << realm->nref << " -> " << (realm->nref - 1) << dendl;
if (--realm->nref == 0) {
snap_realms.erase(realm->ino);
bool Client::adjust_realm_parent(SnapRealm *realm, inodeno_t parent)
{
if (realm->parent != parent) {
- ldout(cct, 10) << "adjust_realm_parent " << *realm
+ ldout(cct, 10) << __func__ << " " << *realm
<< " " << realm->parent << " -> " << parent << dendl;
realm->parent = parent;
if (realm->pparent) {
void Client::update_snap_trace(bufferlist& bl, SnapRealm **realm_ret, bool flush)
{
SnapRealm *first_realm = NULL;
- ldout(cct, 10) << "update_snap_trace len " << bl.length() << dendl;
+ ldout(cct, 10) << __func__ << " len " << bl.length() << dendl;
map<SnapRealm*, SnapContext> dirty_realms;
bool invalidate = false;
if (info.seq() > realm->seq) {
- ldout(cct, 10) << "update_snap_trace " << *realm << " seq " << info.seq() << " > " << realm->seq
+ ldout(cct, 10) << __func__ << " " << *realm << " seq " << info.seq() << " > " << realm->seq
<< dendl;
if (flush) {
if (invalidate) {
invalidate_snaprealm_and_children(realm);
- ldout(cct, 15) << "update_snap_trace " << *realm << " self|parent updated" << dendl;
+ ldout(cct, 15) << __func__ << " " << *realm << " self|parent updated" << dendl;
ldout(cct, 15) << " snapc " << realm->get_snap_context() << dendl;
} else {
- ldout(cct, 10) << "update_snap_trace " << *realm << " seq " << info.seq()
+ ldout(cct, 10) << __func__ << " " << *realm << " seq " << info.seq()
<< " <= " << realm->seq << " and same parent, SKIPPING" << dendl;
}
void Client::handle_snap(MClientSnap *m)
{
- ldout(cct, 10) << "handle_snap " << *m << dendl;
+ ldout(cct, 10) << __func__ << " " << *m << dendl;
mds_rank_t mds = mds_rank_t(m->get_source().num());
MetaSession *session = _get_mds_session(mds, m->get_connection().get());
if (!session) {
got_mds_push(session);
- ldout(cct, 10) << "handle_quota " << *m << " from mds." << mds << dendl;
+ ldout(cct, 10) << __func__ << " " << *m << " from mds." << mds << dendl;
vinodeno_t vino(m->ino, CEPH_NOSNAP);
if (inode_map.count(vino)) {
in = inode_map[vino];
if (!in) {
if (m->get_op() == CEPH_CAP_OP_IMPORT) {
- ldout(cct, 5) << "handle_caps don't have vino " << vino << " on IMPORT, immediately releasing" << dendl;
+ ldout(cct, 5) << __func__ << " don't have vino " << vino << " on IMPORT, immediately releasing" << dendl;
session->enqueue_cap_release(
m->get_ino(),
m->get_cap_id(),
m->get_mseq(),
cap_epoch_barrier);
} else {
- ldout(cct, 5) << "handle_caps don't have vino " << vino << ", dropping" << dendl;
+ ldout(cct, 5) << __func__ << " don't have vino " << vino << ", dropping" << dendl;
}
m->put();
}
if (in->caps.count(mds) == 0) {
- ldout(cct, 5) << "handle_caps don't have " << *in << " cap on mds." << mds << dendl;
+ ldout(cct, 5) << __func__ << " don't have " << *in << " cap on mds." << mds << dendl;
m->put();
return;
}
{
mds_rank_t mds = session->mds_num;
- ldout(cct, 5) << "handle_cap_import ino " << m->get_ino() << " mseq " << m->get_mseq()
+ ldout(cct, 5) << __func__ << " ino " << m->get_ino() << " mseq " << m->get_mseq()
<< " IMPORT from mds." << mds << dendl;
const mds_rank_t peer_mds = mds_rank_t(m->peer.mds);
{
mds_rank_t mds = session->mds_num;
- ldout(cct, 5) << "handle_cap_export ino " << m->get_ino() << " mseq " << m->get_mseq()
+ ldout(cct, 5) << __func__ << " ino " << m->get_ino() << " mseq " << m->get_mseq()
<< " EXPORT from mds." << mds << dendl;
auto it = in->caps.find(mds);
mds_rank_t mds = session->mds_num;
assert(in->caps.count(mds));
- ldout(cct, 10) << "handle_cap_trunc on ino " << *in
+ ldout(cct, 10) << __func__ << " on ino " << *in
<< " size " << in->size << " -> " << m->get_size()
<< dendl;
++it;
}
- ldout(cct, 5) << "handle_cap_flush_ack mds." << session->mds_num
+ ldout(cct, 5) << __func__ << " mds." << session->mds_num
<< " cleaned " << ccap_string(cleaned) << " on " << *in
<< " with " << ccap_string(dirty) << dendl;
if (m->get_client_tid() != capsnap.flush_tid) {
ldout(cct, 10) << " tid " << m->get_client_tid() << " != " << capsnap.flush_tid << dendl;
} else {
- ldout(cct, 5) << "handle_cap_flushedsnap mds." << mds << " flushed snap follows " << follows
+ ldout(cct, 5) << __func__ << " mds." << mds << " flushed snap follows " << follows
<< " on " << *in << dendl;
InodeRef tmp_ref;
if (in->get_num_ref() == 1)
in->cap_snaps.erase(follows);
}
} else {
- ldout(cct, 5) << "handle_cap_flushedsnap DUP(?) mds." << mds << " flushed snap follows " << follows
+ ldout(cct, 5) << __func__ << " DUP(?) mds." << mds << " flushed snap follows " << follows
<< " on " << *in << dendl;
// we may not have it if we send multiple FLUSHSNAP requests and (got multiple FLUSHEDSNAPs back)
}
{
if (unmounting)
return;
- ldout(cct, 10) << "_async_dentry_invalidate '" << name << "' ino " << ino
+ ldout(cct, 10) << __func__ << " '" << name << "' ino " << ino
<< " in dir " << dirino << dendl;
dentry_invalidate_cb(callback_handle, dirino, ino, name);
}
const int old_caps = cap->issued;
const int new_caps = m->get_caps();
- ldout(cct, 5) << "handle_cap_grant on in " << m->get_ino()
+ ldout(cct, 5) << __func__ << " on in " << m->get_ino()
<< " mds." << mds << " seq " << m->get_seq()
<< " caps now " << ccap_string(new_caps)
<< " was " << ccap_string(old_caps) << dendl;
mask |= DEBUG_GETATTR_CAPS;
req->head.args.getattr.mask = mask;
- ldout(cct, 10) << "_do_lookup on " << path << dendl;
+ ldout(cct, 10) << __func__ << " on " << path << dendl;
int r = make_request(req, perms, target);
- ldout(cct, 10) << "_do_lookup res is " << r << dendl;
+ ldout(cct, 10) << __func__ << " res is " << r << dendl;
return r;
}
dir->dir->dentries.count(dname)) {
dn = dir->dir->dentries[dname];
- ldout(cct, 20) << "_lookup have dn " << dname << " mds." << dn->lease_mds << " ttl " << dn->lease_ttl
+ ldout(cct, 20) << __func__ << " have dn " << dname << " mds." << dn->lease_mds << " ttl " << dn->lease_ttl
<< " seq " << dn->lease_seq
<< dendl;
(!dn->inode || dn->inode->caps_issued_mask(mask)))
goto hit_dn;
if (!dn->inode && (dir->flags & I_COMPLETE)) {
- ldout(cct, 10) << "_lookup concluded ENOENT locally for "
+ ldout(cct, 10) << __func__ << " concluded ENOENT locally for "
<< *dir << " dn '" << dname << "'" << dendl;
return -ENOENT;
}
// can we conclude ENOENT locally?
if (dir->caps_issued_mask(CEPH_CAP_FILE_SHARED) &&
(dir->flags & I_COMPLETE)) {
- ldout(cct, 10) << "_lookup concluded ENOENT locally for " << *dir << " dn '" << dname << "'" << dendl;
+ ldout(cct, 10) << __func__ << " concluded ENOENT locally for " << *dir << " dn '" << dname << "'" << dendl;
return -ENOENT;
}
}
done:
if (r < 0)
- ldout(cct, 10) << "_lookup " << *dir << " " << dname << " = " << r << dendl;
+ ldout(cct, 10) << __func__ << " " << *dir << " " << dname << " = " << r << dendl;
else
- ldout(cct, 10) << "_lookup " << *dir << " " << dname << " = " << **target << dendl;
+ ldout(cct, 10) << __func__ << " " << *dir << " " << dname << " = " << **target << dendl;
return r;
}
Dentry **pdn, bool expect_null)
{
// lookup
- ldout(cct, 20) << "get_or_create " << *dir << " name " << name << dendl;
+ ldout(cct, 20) << __func__ << " " << *dir << " name " << name << dendl;
dir->open_dir();
if (dir->dir->dentries.count(name)) {
Dentry *dn = dir->dir->dentries[name];
cur = cwd;
assert(cur);
- ldout(cct, 10) << "path_walk " << path << dendl;
+ ldout(cct, 10) << __func__ << " " << path << dendl;
int symlinks = 0;
int Client::unlink(const char *relpath, const UserPerm& perm)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "unlink" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
if (unmounting)
int Client::rename(const char *relfrom, const char *relto, const UserPerm& perm)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "rename" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relfrom << std::endl;
tout(cct) << relto << std::endl;
int Client::mkdir(const char *relpath, mode_t mode, const UserPerm& perm)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "mkdir" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << mode << std::endl;
- ldout(cct, 10) << "mkdir: " << relpath << dendl;
+ ldout(cct, 10) << __func__ << ": " << relpath << dendl;
if (unmounting)
return -ENOTCONN;
{
Mutex::Locker lock(client_lock);
ldout(cct, 10) << "Client::mkdirs " << relpath << dendl;
- tout(cct) << "mkdirs" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << mode << std::endl;
//check that we have work left to do
if (i==path.depth()) return -EEXIST;
if (r!=-ENOENT) return r;
- ldout(cct, 20) << "mkdirs got through " << i << " directories on path " << relpath << dendl;
+ ldout(cct, 20) << __func__ << " got through " << i << " directories on path " << relpath << dendl;
//make new directory at each level
for (; i<path.depth(); ++i) {
if (cct->_conf->client_permissions) {
return r;
//move to new dir and continue
cur.swap(next);
- ldout(cct, 20) << "mkdirs: successfully created directory "
+ ldout(cct, 20) << __func__ << ": successfully created directory "
<< filepath(cur->ino).get_path() << dendl;
}
return 0;
int Client::rmdir(const char *relpath, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "rmdir" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
if (unmounting)
int Client::mknod(const char *relpath, mode_t mode, const UserPerm& perms, dev_t rdev)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "mknod" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << mode << std::endl;
tout(cct) << rdev << std::endl;
int Client::symlink(const char *target, const char *relpath, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "symlink" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << target << std::endl;
tout(cct) << relpath << std::endl;
int Client::readlink(const char *relpath, char *buf, loff_t size, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "readlink" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
if (unmounting)
{
bool yes = in->caps_issued_mask(mask);
- ldout(cct, 10) << "_getattr mask " << ccap_string(mask) << " issued=" << yes << dendl;
+ ldout(cct, 10) << __func__ << " mask " << ccap_string(mask) << " issued=" << yes << dendl;
if (yes && !force)
return 0;
req->head.args.getattr.mask = mask;
int res = make_request(req, perms);
- ldout(cct, 10) << "_getattr result=" << res << dendl;
+ ldout(cct, 10) << __func__ << " result=" << res << dendl;
return res;
}
{
int issued = in->caps_issued();
- ldout(cct, 10) << "_setattr mask " << mask << " issued " <<
+ ldout(cct, 10) << __func__ << " mask " << mask << " issued " <<
ccap_string(issued) << dendl;
if (in->snapid != CEPH_NOSNAP) {
const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "setattr" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << mask << std::endl;
const UserPerm& perms, int flags)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "setattrx" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << mask << std::endl;
int Client::fsetattr(int fd, struct stat *attr, int mask, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "fsetattr" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << fd << std::endl;
tout(cct) << mask << std::endl;
int Client::fsetattrx(int fd, struct ceph_statx *stx, int mask, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "fsetattr" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << fd << std::endl;
tout(cct) << mask << std::endl;
int Client::stat(const char *relpath, struct stat *stbuf, const UserPerm& perms,
frag_info_t *dirstat, int mask)
{
- ldout(cct, 3) << "stat enter (relpath " << relpath << " mask " << mask << ")" << dendl;
+ ldout(cct, 3) << __func__ << " enter (relpath " << relpath << " mask " << mask << ")" << dendl;
Mutex::Locker lock(client_lock);
tout(cct) << "stat" << std::endl;
tout(cct) << relpath << std::endl;
return r;
r = _getattr(in, mask, perms);
if (r < 0) {
- ldout(cct, 3) << "stat exit on error!" << dendl;
+ ldout(cct, 3) << __func__ << " exit on error!" << dendl;
return r;
}
fill_stat(in, stbuf, dirstat);
- ldout(cct, 3) << "stat exit (relpath " << relpath << " mask " << mask << ")" << dendl;
+ ldout(cct, 3) << __func__ << " exit (relpath " << relpath << " mask " << mask << ")" << dendl;
return r;
}
const UserPerm& perms,
unsigned int want, unsigned int flags)
{
- ldout(cct, 3) << "statx enter (relpath " << relpath << " want " << want << ")" << dendl;
+ ldout(cct, 3) << __func__ << " enter (relpath " << relpath << " want " << want << ")" << dendl;
Mutex::Locker lock(client_lock);
tout(cct) << "statx" << std::endl;
tout(cct) << relpath << std::endl;
r = _getattr(in, mask, perms);
if (r < 0) {
- ldout(cct, 3) << "statx exit on error!" << dendl;
+ ldout(cct, 3) << __func__ << " exit on error!" << dendl;
return r;
}
fill_statx(in, mask, stx);
- ldout(cct, 3) << "statx exit (relpath " << relpath << " mask " << stx->stx_mask << ")" << dendl;
+ ldout(cct, 3) << __func__ << " exit (relpath " << relpath << " mask " << stx->stx_mask << ")" << dendl;
return r;
}
int Client::lstat(const char *relpath, struct stat *stbuf,
const UserPerm& perms, frag_info_t *dirstat, int mask)
{
- ldout(cct, 3) << "lstat enter (relpath " << relpath << " mask " << mask << ")" << dendl;
+ ldout(cct, 3) << __func__ << " enter (relpath " << relpath << " mask " << mask << ")" << dendl;
Mutex::Locker lock(client_lock);
- tout(cct) << "lstat" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
if (unmounting)
return r;
r = _getattr(in, mask, perms);
if (r < 0) {
- ldout(cct, 3) << "lstat exit on error!" << dendl;
+ ldout(cct, 3) << __func__ << " exit on error!" << dendl;
return r;
}
fill_stat(in, stbuf, dirstat);
- ldout(cct, 3) << "lstat exit (relpath " << relpath << " mask " << mask << ")" << dendl;
+ ldout(cct, 3) << __func__ << " exit (relpath " << relpath << " mask " << mask << ")" << dendl;
return r;
}
int Client::fill_stat(Inode *in, struct stat *st, frag_info_t *dirstat, nest_info_t *rstat)
{
- ldout(cct, 10) << "fill_stat on " << in->ino << " snap/dev" << in->snapid
+ ldout(cct, 10) << __func__ << " on " << in->ino << " snap/dev" << in->snapid
<< " mode 0" << oct << in->mode << dec
<< " mtime " << in->mtime << " ctime " << in->ctime << dendl;
memset(st, 0, sizeof(struct stat));
void Client::fill_statx(Inode *in, unsigned int mask, struct ceph_statx *stx)
{
- ldout(cct, 10) << "fill_statx on " << in->ino << " snap/dev" << in->snapid
+ ldout(cct, 10) << __func__ << " on " << in->ino << " snap/dev" << in->snapid
<< " mode 0" << oct << in->mode << dec
<< " mtime " << in->mtime << " ctime " << in->ctime << dendl;
memset(stx, 0, sizeof(struct ceph_statx));
int Client::chmod(const char *relpath, mode_t mode, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "chmod" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << mode << std::endl;
int Client::fchmod(int fd, mode_t mode, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "fchmod" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << fd << std::endl;
tout(cct) << mode << std::endl;
int Client::lchmod(const char *relpath, mode_t mode, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "lchmod" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << mode << std::endl;
const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "chown" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << new_uid << std::endl;
tout(cct) << new_gid << std::endl;
int Client::fchown(int fd, uid_t new_uid, gid_t new_gid, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "fchown" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << fd << std::endl;
tout(cct) << new_uid << std::endl;
tout(cct) << new_gid << std::endl;
const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "lchown" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << new_uid << std::endl;
tout(cct) << new_gid << std::endl;
const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "utime" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << buf->modtime << std::endl;
tout(cct) << buf->actime << std::endl;
const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "lutime" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << buf->modtime << std::endl;
tout(cct) << buf->actime << std::endl;
int Client::flock(int fd, int operation, uint64_t owner)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "flock" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << fd << std::endl;
tout(cct) << operation << std::endl;
tout(cct) << owner << std::endl;
int Client::opendir(const char *relpath, dir_result_t **dirpp, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "opendir" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << relpath << std::endl;
if (unmounting)
return -ENOTDIR;
*dirpp = new dir_result_t(in, perms);
opened_dirs.insert(*dirpp);
- ldout(cct, 3) << "_opendir(" << in->ino << ") = " << 0 << " (" << *dirpp << ")" << dendl;
+ ldout(cct, 3) << __func__ << "(" << in->ino << ") = " << 0 << " (" << *dirpp << ")" << dendl;
return 0;
}
int Client::closedir(dir_result_t *dir)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "closedir" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << (unsigned long)dir << std::endl;
- ldout(cct, 3) << "closedir(" << dir << ") = 0" << dendl;
+ ldout(cct, 3) << __func__ << "(" << dir << ") = 0" << dendl;
_closedir(dir);
return 0;
}
void Client::_closedir(dir_result_t *dirp)
{
- ldout(cct, 10) << "_closedir(" << dirp << ")" << dendl;
+ ldout(cct, 10) << __func__ << "(" << dirp << ")" << dendl;
if (dirp->inode) {
- ldout(cct, 10) << "_closedir detaching inode " << dirp->inode << dendl;
+ ldout(cct, 10) << __func__ << " detaching inode " << dirp->inode << dendl;
dirp->inode.reset();
}
_readdir_drop_dirp_buffer(dirp);
void Client::rewinddir(dir_result_t *dirp)
{
Mutex::Locker lock(client_lock);
- ldout(cct, 3) << "rewinddir(" << dirp << ")" << dendl;
+ ldout(cct, 3) << __func__ << "(" << dirp << ")" << dendl;
if (unmounting)
return;
loff_t Client::telldir(dir_result_t *dirp)
{
dir_result_t *d = static_cast<dir_result_t*>(dirp);
- ldout(cct, 3) << "telldir(" << dirp << ") = " << d->offset << dendl;
+ ldout(cct, 3) << __func__ << "(" << dirp << ") = " << d->offset << dendl;
return d->offset;
}
{
Mutex::Locker lock(client_lock);
- ldout(cct, 3) << "seekdir(" << dirp << ", " << offset << ")" << dendl;
+ ldout(cct, 3) << __func__ << "(" << dirp << ", " << offset << ")" << dendl;
if (unmounting)
return;
#endif
de->d_reclen = 1;
de->d_type = IFTODT(type);
- ldout(cct, 10) << "fill_dirent '" << de->d_name << "' -> " << inodeno_t(de->d_ino)
+ ldout(cct, 10) << __func__ << " '" << de->d_name << "' -> " << inodeno_t(de->d_ino)
<< " type " << (int)de->d_type << " w/ next_off " << hex << next_off << dec << dendl;
#endif
}
frag_t fg = dirp->buffer_frag;
if (fg.is_rightmost()) {
- ldout(cct, 10) << "_readdir_next_frag advance from " << fg << " to END" << dendl;
+ ldout(cct, 10) << __func__ << " advance from " << fg << " to END" << dendl;
dirp->set_end();
return;
}
// advance
fg = fg.next();
- ldout(cct, 10) << "_readdir_next_frag advance from " << dirp->buffer_frag << " to " << fg << dendl;
+ ldout(cct, 10) << __func__ << " advance from " << dirp->buffer_frag << " to " << fg << dendl;
if (dirp->hash_order()) {
// keep last_name
frag_t cur = frag_t(dirp->offset_high());
frag_t fg = dirp->inode->dirfragtree[cur.value()];
if (fg != cur) {
- ldout(cct, 10) << "_readdir_rechoose_frag frag " << cur << " maps to " << fg << dendl;
+ ldout(cct, 10) << __func__ << " frag " << cur << " maps to " << fg << dendl;
dirp->offset = dir_result_t::make_fpos(fg, 2, false);
dirp->last_name.clear();
dirp->next_offset = 2;
void Client::_readdir_drop_dirp_buffer(dir_result_t *dirp)
{
- ldout(cct, 10) << "_readdir_drop_dirp_buffer " << dirp << dendl;
+ ldout(cct, 10) << __func__ << " " << dirp << dendl;
dirp->buffer.clear();
}
else
fg = frag_t(dirp->offset_high());
- ldout(cct, 10) << "_readdir_get_frag " << dirp << " on " << dirp->inode->ino << " fg " << fg
+ ldout(cct, 10) << __func__ << " " << dirp << " on " << dirp->inode->ino << " fg " << fg
<< " offset " << hex << dirp->offset << dec << dendl;
int op = CEPH_MDS_OP_READDIR;
int res = make_request(req, dirp->perms, NULL, NULL, -1, &dirbl);
if (res == -EAGAIN) {
- ldout(cct, 10) << "_readdir_get_frag got EAGAIN, retrying" << dendl;
+ ldout(cct, 10) << __func__ << " got EAGAIN, retrying" << dendl;
_readdir_rechoose_frag(dirp);
return _readdir_get_frag(dirp);
}
if (res == 0) {
- ldout(cct, 10) << "_readdir_get_frag " << dirp << " got frag " << dirp->buffer_frag
+ ldout(cct, 10) << __func__ << " " << dirp << " got frag " << dirp->buffer_frag
<< " size " << dirp->buffer.size() << dendl;
} else {
- ldout(cct, 10) << "_readdir_get_frag got error " << res << ", setting end flag" << dendl;
+ ldout(cct, 10) << __func__ << " got error " << res << ", setting end flag" << dendl;
dirp->set_end();
}
int caps, bool getref)
{
assert(client_lock.is_locked());
- ldout(cct, 10) << "_readdir_cache_cb " << dirp << " on " << dirp->inode->ino
+ ldout(cct, 10) << __func__ << " " << dirp << " on " << dirp->inode->ino
<< " last_name " << dirp->last_name << " offset " << hex << dirp->offset << dec
<< dendl;
Dir *dir = dirp->inode->dir;
return r;
}
- ldout(cct, 10) << "_readdir_cache_cb " << dirp << " on " << dirp->inode->ino << " at end" << dendl;
+ ldout(cct, 10) << __func__ << " " << dirp << " on " << dirp->inode->ino << " at end" << dendl;
dirp->set_end();
return 0;
}
dir_result_t *dirp = static_cast<dir_result_t*>(d);
- ldout(cct, 10) << "readdir_r_cb " << *dirp->inode << " offset " << hex << dirp->offset
+ ldout(cct, 10) << __func__ << " " << *dirp->inode << " offset " << hex << dirp->offset
<< dec << " at_end=" << dirp->at_end()
<< " hash_order=" << dirp->hash_order() << dendl;
const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- ldout(cct, 3) << "lookup_hash enter(" << ino << ", #" << dirino << "/" << name << ")" << dendl;
+ ldout(cct, 3) << __func__ << " enter(" << ino << ", #" << dirino << "/" << name << ")" << dendl;
if (unmounting)
return -ENOTCONN;
int r = make_request(req, perms, NULL, NULL,
rand() % mdsmap->get_num_in_mds());
- ldout(cct, 3) << "lookup_hash exit(" << ino << ", #" << dirino << "/" << name << ") = " << r << dendl;
+ ldout(cct, 3) << __func__ << " exit(" << ino << ", #" << dirino << "/" << name << ") = " << r << dendl;
return r;
}
int Client::lookup_ino(inodeno_t ino, const UserPerm& perms, Inode **inode)
{
Mutex::Locker lock(client_lock);
- ldout(cct, 3) << "lookup_ino enter(" << ino << ")" << dendl;
+ ldout(cct, 3) << __func__ << " enter(" << ino << ")" << dendl;
if (unmounting)
return -ENOTCONN;
*inode = p->second;
_ll_get(*inode);
}
- ldout(cct, 3) << "lookup_ino exit(" << ino << ") = " << r << dendl;
+ ldout(cct, 3) << __func__ << " exit(" << ino << ") = " << r << dendl;
return r;
}
int Client::lookup_parent(Inode *ino, const UserPerm& perms, Inode **parent)
{
Mutex::Locker lock(client_lock);
- ldout(cct, 3) << "lookup_parent enter(" << ino->ino << ")" << dendl;
+ ldout(cct, 3) << __func__ << " enter(" << ino->ino << ")" << dendl;
if (unmounting)
return -ENOTCONN;
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) << "lookup_parent dentry already present" << dendl;
+ ldout(cct, 3) << __func__ << " dentry already present" << dendl;
return 0;
}
if (r == 0) {
*parent = target.get();
_ll_get(*parent);
- ldout(cct, 3) << "lookup_parent found parent " << (*parent)->ino << dendl;
+ ldout(cct, 3) << __func__ << " found parent " << (*parent)->ino << dendl;
} else {
*parent = NULL;
}
}
- ldout(cct, 3) << "lookup_parent exit(" << ino->ino << ") = " << r << dendl;
+ ldout(cct, 3) << __func__ << " exit(" << ino->ino << ") = " << r << dendl;
return r;
}
assert(parent->is_dir());
Mutex::Locker lock(client_lock);
- ldout(cct, 3) << "lookup_name enter(" << ino->ino << ")" << dendl;
+ ldout(cct, 3) << __func__ << " enter(" << ino->ino << ")" << dendl;
if (unmounting)
return -ENOTCONN;
req->set_inode(ino);
int r = make_request(req, perms, NULL, NULL, rand() % mdsmap->get_num_in_mds());
- ldout(cct, 3) << "lookup_name exit(" << ino->ino << ") = " << r << dendl;
+ ldout(cct, 3) << __func__ << " exit(" << ino->ino << ") = " << r << dendl;
return r;
}
assert(in);
Fh *f = new Fh(in, flags, cmode, perms);
- ldout(cct, 10) << "_create_fh " << in->ino << " mode " << cmode << dendl;
+ ldout(cct, 10) << __func__ << " " << in->ino << " mode " << cmode << dendl;
if (in->snapid != CEPH_NOSNAP) {
in->snap_cap_refs++;
//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) << "_release_fh " << f << " mode " << f->mode << " on " << *in << dendl;
+ ldout(cct, 5) << __func__ << " " << f << " mode " << f->mode << " on " << *in << dendl;
in->unset_deleg(f);
// Finally, read any async err (i.e. from flushes)
int err = f->take_async_err();
if (err != 0) {
- ldout(cct, 1) << "_release_fh " << f << " on inode " << *in << " caught async_err = "
+ ldout(cct, 1) << __func__ << " " << f << " on inode " << *in << " caught async_err = "
<< cpp_strerror(err) << dendl;
} else {
- ldout(cct, 10) << "_release_fh " << f << " on inode " << *in << " no async_err state" << dendl;
+ ldout(cct, 10) << __func__ << " " << f << " on inode " << *in << " no async_err state" << dendl;
}
_put_fh(f);
void Client::lock_fh_pos(Fh *f)
{
- ldout(cct, 10) << "lock_fh_pos " << f << dendl;
+ ldout(cct, 10) << __func__ << " " << f << dendl;
if (f->pos_locked || !f->pos_waiters.empty()) {
Cond cond;
f->pos_waiters.push_back(&cond);
- ldout(cct, 10) << "lock_fh_pos BLOCKING on " << f << dendl;
+ ldout(cct, 10) << __func__ << " BLOCKING on " << f << dendl;
while (f->pos_locked || f->pos_waiters.front() != &cond)
cond.Wait(client_lock);
- ldout(cct, 10) << "lock_fh_pos UNBLOCKING on " << f << dendl;
+ ldout(cct, 10) << __func__ << " UNBLOCKING on " << f << dendl;
assert(f->pos_waiters.front() == &cond);
f->pos_waiters.pop_front();
}
void Client::unlock_fh_pos(Fh *f)
{
- ldout(cct, 10) << "unlock_fh_pos " << f << dendl;
+ ldout(cct, 10) << __func__ << " " << f << dendl;
f->pos_locked = false;
}
const md_config_t *conf = cct->_conf;
Inode *in = f->inode.get();
- ldout(cct, 10) << "_read_async " << *in << " " << off << "~" << len << dendl;
+ ldout(cct, 10) << __func__ << " " << *in << " " << off << "~" << len << dendl;
// trim read based on file size?
if (off >= in->size)
int left = len;
int read = 0;
- ldout(cct, 10) << "_read_sync " << *in << " " << off << "~" << len << dendl;
+ ldout(cct, 10) << __func__ << " " << *in << " " << off << "~" << len << dendl;
Mutex flock("Client::_read_sync flock");
Cond cond;
put_cap_ref(in, CEPH_CAP_FILE_BUFFER);
- ldout(cct, 15) << "sync_write_commit unsafe_sync_write = " << unsafe_sync_write << dendl;
+ ldout(cct, 15) << __func__ << " unsafe_sync_write = " << unsafe_sync_write << dendl;
if (unsafe_sync_write == 0 && unmounting) {
- ldout(cct, 10) << "sync_write_commit -- no more unsafe writes, unmount can proceed" << dendl;
+ ldout(cct, 10) << __func__ << " -- no more unsafe writes, unmount can proceed" << dendl;
mount_cond.Signal();
}
}
int Client::ftruncate(int fd, loff_t length, const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "ftruncate" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << fd << std::endl;
tout(cct) << length << std::endl;
void Client::_getcwd(string& dir, const UserPerm& perms)
{
filepath path;
- ldout(cct, 10) << "getcwd " << *cwd << dendl;
+ ldout(cct, 10) << __func__ << " " << *cwd << dendl;
Inode *in = cwd.get();
while (in != root) {
if (!dn) {
// look it up
- ldout(cct, 10) << "getcwd looking up parent for " << *in << dendl;
+ ldout(cct, 10) << __func__ << " looking up parent for " << *in << dendl;
MetaRequest *req = new MetaRequest(CEPH_MDS_OP_LOOKUPNAME);
filepath path(in->ino);
req->set_filepath(path);
const UserPerm& perms)
{
Mutex::Locker l(client_lock);
- tout(cct) << "statfs" << std::endl;
+ tout(cct) << __func__ << std::endl;
if (unmounting)
return -ENOTCONN;
int Client::_do_filelock(Inode *in, Fh *fh, int lock_type, int op, int sleep,
struct flock *fl, uint64_t owner, bool removing)
{
- ldout(cct, 10) << "_do_filelock ino " << in->ino
+ ldout(cct, 10) << __func__ << " ino " << in->ino
<< (lock_type == CEPH_LOCK_FCNTL ? " fcntl" : " flock")
<< " type " << fl->l_type << " owner " << owner
<< " " << fl->l_start << "~" << fl->l_len << dendl;
encode(p->second, bl);
}
- ldout(cct, 10) << "_encode_filelocks ino " << in->ino << ", " << nr_fcntl_locks
+ ldout(cct, 10) << __func__ << " ino " << in->ino << ", " << nr_fcntl_locks
<< " fcntl locks, " << nr_flock_locks << " flock locks" << dendl;
}
return;
Inode *in = fh->inode.get();
- ldout(cct, 10) << "_release_filelocks " << fh << " ino " << in->ino << dendl;
+ ldout(cct, 10) << __func__ << " " << fh << " ino " << in->ino << dendl;
list<pair<int, ceph_filelock> > to_release;
if (!args)
return;
Mutex::Locker l(client_lock);
- ldout(cct, 10) << "ll_register_callbacks cb " << args->handle
+ ldout(cct, 10) << __func__ << " cb " << args->handle
<< " invalidate_ino_cb " << args->ino_cb
<< " invalidate_dentry_cb " << args->dentry_cb
<< " getgroups_cb" << args->getgroups_cb
int Client::_sync_fs()
{
- ldout(cct, 10) << "_sync_fs" << dendl;
+ ldout(cct, 10) << __func__ << dendl;
// flush file data
Mutex lock("Client::_fsync::lock");
{
Mutex::Locker lock(client_lock);
vinodeno_t vparent = _get_vino(parent);
- ldout(cct, 3) << "ll_lookup " << vparent << " " << name << dendl;
- tout(cct) << "ll_lookup" << std::endl;
+ ldout(cct, 3) << __func__ << " " << vparent << " " << name << dendl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << name << std::endl;
if (unmounting)
_ll_get(in.get());
out:
- ldout(cct, 3) << "ll_lookup " << vparent << " " << name
+ ldout(cct, 3) << __func__ << " " << vparent << " " << name
<< " -> " << r << " (" << hex << attr->st_ino << dec << ")" << dendl;
tout(cct) << attr->st_ino << std::endl;
*out = in.get();
{
Mutex::Locker lock(client_lock);
vinodeno_t vparent = _get_vino(parent);
- ldout(cct, 3) << "ll_lookupx " << vparent << " " << name << dendl;
+ ldout(cct, 3) << __func__ << " " << vparent << " " << name << dendl;
tout(cct) << "ll_lookupx" << std::endl;
tout(cct) << name << std::endl;
_ll_get(in.get());
}
- ldout(cct, 3) << "ll_lookupx " << vparent << " " << name
+ ldout(cct, 3) << __func__ << " " << vparent << " " << name
<< " -> " << r << " (" << hex << stx->stx_ino << dec << ")" << dendl;
tout(cct) << stx->stx_ino << std::endl;
*out = in.get();
int rc;
unsigned mask = statx_to_mask(flags, want);
- ldout(cct, 3) << "ll_walk" << name << dendl;
- tout(cct) << "ll_walk" << std::endl;
+ ldout(cct, 3) << __func__ << name << dendl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << name << std::endl;
rc = path_walk(fp, &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), mask);
}
}
in->ll_get();
- ldout(cct, 20) << "_ll_get " << in << " " << in->ino << " -> " << in->ll_ref << dendl;
+ ldout(cct, 20) << __func__ << " " << in << " " << in->ino << " -> " << in->ll_ref << dendl;
}
int Client::_ll_put(Inode *in, int num)
{
in->ll_put(num);
- ldout(cct, 20) << "_ll_put " << in << " " << in->ino << " " << num << " -> " << in->ll_ref << dendl;
+ ldout(cct, 20) << __func__ << " " << in << " " << in->ino << " " << num << " -> " << in->ll_ref << dendl;
if (in->ll_ref == 0) {
if (in->is_dir() && !in->dentries.empty()) {
assert(in->dentries.size() == 1); // dirs can't be hard-linked
void Client::_ll_drop_pins()
{
- ldout(cct, 10) << "_ll_drop_pins" << dendl;
+ ldout(cct, 10) << __func__ << dendl;
ceph::unordered_map<vinodeno_t, Inode*>::iterator next;
for (ceph::unordered_map<vinodeno_t, Inode*>::iterator it = inode_map.begin();
it != inode_map.end();
Mutex::Locker lock(client_lock);
inodeno_t ino = _get_inodeno(in);
- ldout(cct, 3) << "ll_forget " << ino << " " << count << dendl;
- tout(cct) << "ll_forget" << std::endl;
+ ldout(cct, 3) << __func__ << " " << ino << " " << count << dendl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << ino.val << std::endl;
tout(cct) << count << std::endl;
{
vinodeno_t vino = _get_vino(in);
- ldout(cct, 3) << "ll_getattr " << vino << dendl;
- tout(cct) << "ll_getattr" << std::endl;
+ ldout(cct, 3) << __func__ << " " << vino << dendl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << vino.ino.val << std::endl;
if (vino.snapid < CEPH_NOSNAP)
if (res == 0)
fill_stat(in, attr);
- ldout(cct, 3) << "ll_getattr " << _get_vino(in) << " = " << res << dendl;
+ ldout(cct, 3) << __func__ << " " << _get_vino(in) << " = " << res << dendl;
return res;
}
if (res == 0)
fill_statx(in, mask, stx);
- ldout(cct, 3) << "ll_getattrx " << _get_vino(in) << " = " << res << dendl;
+ ldout(cct, 3) << __func__ << " " << _get_vino(in) << " = " << res << dendl;
return res;
}
{
vinodeno_t vino = _get_vino(in);
- ldout(cct, 3) << "ll_setattrx " << vino << " mask " << hex << mask << dec
+ ldout(cct, 3) << __func__ << " " << vino << " mask " << hex << mask << dec
<< dendl;
- tout(cct) << "ll_setattrx" << std::endl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << vino.ino.val << std::endl;
tout(cct) << stx->stx_mode << std::endl;
tout(cct) << stx->stx_uid << std::endl;
fill_statx(in, in->caps_issued(), stx);
}
- ldout(cct, 3) << "ll_setattrx " << _get_vino(in) << " = " << res << dendl;
+ ldout(cct, 3) << __func__ << " " << _get_vino(in) << " = " << res << dendl;
return res;
}
fill_stat(in, attr);
}
- ldout(cct, 3) << "ll_setattr " << _get_vino(in) << " = " << res << dendl;
+ ldout(cct, 3) << __func__ << " " << _get_vino(in) << " = " << res << dendl;
return res;
}
vinodeno_t vino = _get_vino(in);
- ldout(cct, 3) << "ll_getxattr " << vino << " " << name << " size " << size << dendl;
- tout(cct) << "ll_getxattr" << std::endl;
+ ldout(cct, 3) << __func__ << " " << vino << " " << name << " size " << size << dendl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << vino.ino.val << std::endl;
tout(cct) << name << std::endl;
r = -ERANGE;
}
}
- ldout(cct, 3) << "_listxattr(" << in->ino << ", " << size << ") = " << r << dendl;
+ ldout(cct, 3) << __func__ << "(" << in->ino << ", " << size << ") = " << r << dendl;
return r;
}
vinodeno_t vino = _get_vino(in);
- ldout(cct, 3) << "ll_listxattr " << vino << " size " << size << dendl;
- tout(cct) << "ll_listxattr" << std::endl;
+ ldout(cct, 3) << __func__ << " " << vino << " size " << size << dendl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << vino.ino.val << std::endl;
tout(cct) << size << std::endl;
int res = make_request(req, perms);
trim_cache();
- ldout(cct, 3) << "_setxattr(" << in->ino << ", \"" << name << "\") = " <<
+ ldout(cct, 3) << __func__ << "(" << in->ino << ", \"" << name << "\") = " <<
res << dendl;
return res;
}
vinodeno_t vino = _get_vino(in);
- ldout(cct, 3) << "ll_setxattr " << vino << " " << name << " size " << size << dendl;
- tout(cct) << "ll_setxattr" << std::endl;
+ ldout(cct, 3) << __func__ << " " << vino << " " << name << " size " << size << dendl;
+ tout(cct) << __func__ << std::endl;
tout(cct) << vino.ino.val << std::endl;
tout(cct) << name << std::endl;
int Client::ll_fallocate(Fh *fh, int mode, loff_t offset, loff_t length)
{
Mutex::Locker lock(client_lock);
- ldout(cct, 3) << "ll_fallocate " << fh << " " << fh->inode->ino << " " << dendl;
- tout(cct) << "ll_fallocate " << mode << " " << offset << " " << length << std::endl;
+ ldout(cct, 3) << __func__ << " " << fh << " " << fh->inode->ino << " " << dendl;
+ tout(cct) << __func__ << " " << mode << " " << offset << " " << length << std::endl;
tout(cct) << (unsigned long)fh << std::endl;
if (unmounting)
int Client::fallocate(int fd, int mode, loff_t offset, loff_t length)
{
Mutex::Locker lock(client_lock);
- tout(cct) << "fallocate " << " " << fd << mode << " " << offset << " " << length << std::endl;
+ tout(cct) << __func__ << " " << " " << fd << mode << " " << offset << " " << length << std::endl;
if (unmounting)
return -ENOTCONN;
int Client::ll_release(Fh *fh)
{
Mutex::Locker lock(client_lock);
- ldout(cct, 3) << "ll_release (fh)" << fh << " " << fh->inode->ino << " " <<
+ ldout(cct, 3) << __func__ << " (fh)" << fh << " " << fh->inode->ino << " " <<
dendl;
- tout(cct) << "ll_release (fh)" << std::endl;
+ tout(cct) << __func__ << " (fh)" << std::endl;
tout(cct) << (unsigned long)fh << std::endl;
if (unmounting)
{
Mutex::Locker lock(client_lock);
- ldout(cct, 3) << "ll_setlk (fh) " << fh << " " << fh->inode->ino << dendl;
- tout(cct) << "ll_setk (fh)" << (unsigned long)fh << std::endl;
+ ldout(cct, 3) << __func__ << " (fh) " << fh << " " << fh->inode->ino << dendl;
+ tout(cct) << __func__ << " (fh)" << (unsigned long)fh << std::endl;
if (unmounting)
return -ENOTCONN;
{
Mutex::Locker lock(client_lock);
- ldout(cct, 3) << "ll_flock (fh) " << fh << " " << fh->inode->ino << dendl;
- tout(cct) << "ll_flock (fh)" << (unsigned long)fh << std::endl;
+ ldout(cct, 3) << __func__ << " (fh) " << fh << " " << fh->inode->ino << dendl;
+ tout(cct) << __func__ << " (fh)" << (unsigned long)fh << std::endl;
if (unmounting)
return -ENOTCONN;
void Client::ll_interrupt(void *d)
{
MetaRequest *req = static_cast<MetaRequest*>(d);
- ldout(cct, 3) << "ll_interrupt tid " << req->get_tid() << dendl;
- tout(cct) << "ll_interrupt tid " << req->get_tid() << std::endl;
+ ldout(cct, 3) << __func__ << " tid " << req->get_tid() << dendl;
+ tout(cct) << __func__ << " tid " << req->get_tid() << std::endl;
interrupt_finisher.queue(new C_Client_RequestInterrupt(this, req));
}
*lp = in->layout;
- ldout(cct, 3) << "describe_layout(" << relpath << ") = 0" << dendl;
+ ldout(cct, 3) << __func__ << "(" << relpath << ") = 0" << dendl;
return 0;
}
*lp = in->layout;
- ldout(cct, 3) << "fdescribe_layout(" << fd << ") = 0" << dendl;
+ ldout(cct, 3) << __func__ << "(" << fd << ") = 0" << dendl;
return 0;
}
// map to a list of extents
Striper::file_to_extents(cct, in->ino, &in->layout, offset, length, in->truncate_size, result);
- ldout(cct, 3) << "enumerate_layout(" << fd << ", " << length << ", " << offset << ") = 0" << dendl;
+ ldout(cct, 3) << __func__ << "(" << fd << ", " << length << ", " << offset << ") = 0" << dendl;
return 0;
}
void Client::ms_handle_connect(Connection *con)
{
- ldout(cct, 10) << "ms_handle_connect on " << con->get_peer_addr() << dendl;
+ ldout(cct, 10) << __func__ << " on " << con->get_peer_addr() << dendl;
}
bool Client::ms_handle_reset(Connection *con)
{
- ldout(cct, 0) << "ms_handle_reset on " << con->get_peer_addr() << dendl;
+ ldout(cct, 0) << __func__ << " on " << con->get_peer_addr() << dendl;
return false;
}
void Client::ms_handle_remote_reset(Connection *con)
{
- ldout(cct, 0) << "ms_handle_remote_reset on " << con->get_peer_addr() << dendl;
+ ldout(cct, 0) << __func__ << " on " << con->get_peer_addr() << dendl;
Mutex::Locker l(client_lock);
switch (con->get_peer_type()) {
case CEPH_ENTITY_TYPE_MDS:
bool Client::ms_handle_refused(Connection *con)
{
- ldout(cct, 1) << "ms_handle_refused on " << con->get_peer_addr() << dendl;
+ ldout(cct, 1) << __func__ << " on " << con->get_peer_addr() << dendl;
return false;
}
if (rd_ret == 0 || rd_ret == -ENOENT)
have |= POOL_READ;
else if (rd_ret != -EPERM) {
- ldout(cct, 10) << "check_pool_perm on pool " << pool_id << " ns " << pool_ns
+ ldout(cct, 10) << __func__ << " on pool " << pool_id << " ns " << pool_ns
<< " rd_err = " << rd_ret << " wr_err = " << wr_ret << dendl;
errored = true;
}
if (wr_ret == 0 || wr_ret == -EEXIST)
have |= POOL_WRITE;
else if (wr_ret != -EPERM) {
- ldout(cct, 10) << "check_pool_perm on pool " << pool_id << " ns " << pool_ns
+ ldout(cct, 10) << __func__ << " on pool " << pool_id << " ns " << pool_ns
<< " rd_err = " << rd_ret << " wr_err = " << wr_ret << dendl;
errored = true;
}
}
if ((need & CEPH_CAP_FILE_RD) && !(have & POOL_READ)) {
- ldout(cct, 10) << "check_pool_perm on pool " << pool_id << " ns " << pool_ns
+ ldout(cct, 10) << __func__ << " on pool " << pool_id << " ns " << pool_ns
<< " need " << ccap_string(need) << ", but no read perm" << dendl;
return -EPERM;
}
if ((need & CEPH_CAP_FILE_WR) && !(have & POOL_WRITE)) {
- ldout(cct, 10) << "check_pool_perm on pool " << pool_id << " ns " << pool_ns
+ ldout(cct, 10) << __func__ << " on pool " << pool_id << " ns " << pool_ns
<< " need " << ccap_string(need) << ", but no write perm" << dendl;
return -EPERM;
}