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

Method fdescribe_layout

src/client/Client.cc:17798–17815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17796}
17797
17798int Client::fdescribe_layout(int fd, file_layout_t *lp)
17799{
17800 RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
17801 if (!mref_reader.is_state_satisfied())
17802 return -ENOTCONN;
17803
17804 std::scoped_lock lock(client_lock);
17805
17806 Fh *f = get_filehandle(fd);
17807 if (!f)
17808 return -EBADF;
17809 Inode *in = f->inode.get();
17810
17811 *lp = in->layout;
17812
17813 ldout(cct, 3) << __func__ << "(" << fd << ") = 0" << dendl;
17814 return 0;
17815}
17816
17817int64_t Client::get_default_pool_id()
17818{

Callers 8

ceph_get_file_poolFunction · 0.80
ceph_get_file_pool_nameFunction · 0.80
ceph_get_file_layoutFunction · 0.80
chunk_fileMethod · 0.80

Calls 2

is_state_satisfiedMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected