1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| int path_traverse(MDRequestRef& mdr, MDSContextFactory& cf, const filepath& path, int flags, std::vector<CDentry*> *pdnvec, CInode **pin=nullptr);
# flag解析部分
bool discover = (flags & MDS_TRAVERSE_DISCOVER); bool forward = !discover; bool path_locked = (flags & MDS_TRAVERSE_PATH_LOCKED); bool want_dentry = (flags & MDS_TRAVERSE_WANT_DENTRY); bool want_auth = (flags & MDS_TRAVERSE_WANT_AUTH); bool rdlock_snap = (flags & (MDS_TRAVERSE_RDLOCK_SNAP | MDS_TRAVERSE_RDLOCK_SNAP2)); bool rdlock_path = (flags & MDS_TRAVERSE_RDLOCK_PATH); bool xlock_dentry = (flags & MDS_TRAVERSE_XLOCK_DENTRY); bool rdlock_authlock = (flags & MDS_TRAVERSE_RDLOCK_AUTHLOCK);
|