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

Consider a separate file system "environment" #15

Open
cgdecker opened this issue Dec 11, 2014 · 0 comments
Open

Consider a separate file system "environment" #15

cgdecker opened this issue Dec 11, 2014 · 0 comments
Labels
P4 type=enhancement Make an existing feature better

Comments

@cgdecker
Copy link
Member

Brain dump:
It occurs to me that it may be useful to separate the file system from the environment it's operating in. Things that seem like environment:

  • Info on users and (for POSIX) group memberships, where needed.
  • Current user... mutable! Possibly per-thread?
  • Permission checking, using the above user/group info, plus knowledge of permissions, etc. (see Consider actual support for file permissions #11).
  • Default attributes to set when creating a new file. There are a number of issues with this:
    • The default owner of a new file should probably always be the current user, meaning the value for that particular attribute probably needs to be handled differently than other attributes.
    • The environment and file system need to be consistent about attributes: should the environment be the canonical thing that understands attributes...? This kind of makes sense, but it seems easy to expand this to say that the environment also includes things like disks for storing data, etc. until the environment is basically just the file system as it is now.

The environment should also be responsible for, as indicated above, for things like checking permissions. This likely means that:

  • There need to be multiple implementations of environment, such as a POSIX environment that understands POSIX groups, permissions, etc. and a Windows environment that understands DOS things like readonly, plus ACLs, etc.
  • If we want to support creating in-memory file systems that are similar to file systems other than Unix, Windows, etc. (as we've already tried to do with file attributes), the environment needs to be extensible.

It seems pretty clear to me now that given what the environment needs to do, it should be responsible for attributes in general. This could also simplify things a bit from the current "combine whatever attribute views you want", making it instead "use one of these prepackaged environments", which could include a basic environment (no permission checking, just a basic attribute view, etc.) a POSIX environment, a Windows environment, etc.

Of course, then there's a further issue of how to deal with, say, the possibility of creating a file system with a POSIX environment but using Windows-style paths, etc., which would be really weird.

@cgdecker cgdecker added the type=enhancement Make an existing feature better label Dec 11, 2014
@cpovirk cpovirk added the P4 label Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 type=enhancement Make an existing feature better
Projects
None yet
Development

No branches or pull requests

2 participants