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

Method open_dir

src/client/Inode.cc:424–435  ·  view source on GitHub ↗

open Dir for an inode. if it's not open, allocated it (and pin dentry in memory).

Source from the content-addressed store, hash-verified

422
423// open Dir for an inode. if it's not open, allocated it (and pin dentry in memory).
424Dir *Inode::open_dir()
425{
426 if (!dir) {
427 dir = new Dir(this);
428 lsubdout(client->cct, client, 15) << "open_dir " << dir << " on " << this << dendl;
429 ceph_assert(dentries.size() < 2); // dirs can't be hard-linked
430 if (!dentries.empty())
431 get_first_parent()->get(); // pin dentry
432 iget(); // pin inode
433 }
434 return dir;
435}
436
437bool Inode::check_mode(const UserPerm& perms, unsigned want)
438{

Callers 3

insert_traceMethod · 0.45
get_or_createMethod · 0.45

Calls 3

sizeMethod · 0.45
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected