MCPcopy Create free account
hub / github.com/ceph/ceph / stat

Method stat

src/client/Client.cc:8983–9008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8981}
8982
8983int Client::stat(const char *relpath, struct stat *stbuf, const UserPerm& perms,
8984 frag_info_t *dirstat, int mask)
8985{
8986 RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
8987 if (!mref_reader.is_state_satisfied())
8988 return -ENOTCONN;
8989
8990 ldout(cct, 3) << __func__ << " enter (relpath " << relpath << " mask " << mask << ")" << dendl;
8991 tout(cct) << "stat" << std::endl;
8992 tout(cct) << relpath << std::endl;
8993
8994 filepath path(relpath);
8995 InodeRef in;
8996
8997 std::scoped_lock lock(client_lock);
8998 if (int rc = path_walk(cwd, relpath, &in, perms, {.mask = (unsigned)mask}); rc < 0) {
8999 return rc;
9000 }
9001 if (int rc = _getattr(in, mask, perms); rc < 0) {
9002 ldout(cct, 3) << __func__ << " exit on error!" << dendl;
9003 return rc;
9004 }
9005 fill_stat(in, stbuf, dirstat);
9006 ldout(cct, 3) << __func__ << " exit (relpath " << relpath << " mask " << mask << ")" << dendl;
9007 return 0;
9008}
9009
9010unsigned Client::statx_to_mask(unsigned int flags, unsigned int want)
9011{

Callers 11

check_pool_permMethod · 0.45
play_traceMethod · 0.45
update_meta_fileFunction · 0.45
bootstrapMethod · 0.45
__init__Method · 0.45
_path_is_block_deviceMethod · 0.45

Calls 1

is_state_satisfiedMethod · 0.80