-
Notifications
You must be signed in to change notification settings - Fork 990
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: It's not really magic because we don't have a virtual directory inode base any more. Instead, we mkdir and populate it at mount time. What is slightly magical about it is that we give it some special powers: * We know the inode number of the eden dir and prevent unlink operations on it or inside it. * The .eden dir is present in the contents of the root inode and will show up when that directory is `readdir`'d * When resolving a child of a TreeInode by name, we know to return the magic `.eden` inode number. This means that it is possible to `stat` and consume the `.eden` directory from any directory inside the eden mount, even though it won't show up in `readdir` for those child dirs. The contents of the `.eden` dir are: * `socket` - a symlink back to the unix domain socket that our thrift server is listening on. This means that it is a simple `readlink(".eden/socket")` operation to discover both whether a directory is part of an eden mount and how to talk to the server. * `root` - a symlink back to the root of this eden mount. This allows using `readlink(".eden/root")` as a simple 1-step operation to find the root of an eden mount, and avoids needing to walk up directory by directory as is the common pattern for locating `.hg` or `.git` dirs. Reviewed By: simpkins Differential Revision: D4637285 fbshipit-source-id: 0eabf98b29144acccef5c83bd367493399dc55bb
- Loading branch information
1 parent
658a284
commit 616d9fb
Showing
2 changed files
with
57 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters