Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LibOS] Convert pseudo filesystem to use inodes #402

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions LibOS/shim/include/shim_fs_pseudo.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,27 @@ struct shim_dev_ops {
#define PSEUDO_PERM_FILE_R PERM_r__r__r__ /* default for all other files */
#define PSEUDO_PERM_FILE_RW PERM_rw_rw_rw_

/* Maximum count of created nodes (`pseudo_add_*` calls) */
#define PSEUDO_MAX_NODES 128

/*
* A node of the pseudo filesystem. A single node can describe either a single file, or a family of
* files (see `name_exists` and `list_names` below).
*
* The constructors for `pseudo_node` (`pseudo_add_*`) take arguments for most commonly used fields.
* The node can then be further customized by directly modifying other fields.
*
* NOTE: We assume that all Gramine processes within a single instance create exactly the same set
* of nodes, in the same order, during initialization. This is because we use the node number (`id`)
* for checkpointing.
*/
DEFINE_LIST(pseudo_node);
DEFINE_LISTP(pseudo_node);
struct pseudo_node {
enum pseudo_type type;

unsigned int id;

LIST_TYPE(pseudo_node) siblings;

struct pseudo_node* parent;
Expand Down
Loading