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

Properly Handling Filesystems #1642

Open
3 of 12 tasks
jbenet opened this issue Sep 3, 2015 · 6 comments
Open
3 of 12 tasks

Properly Handling Filesystems #1642

jbenet opened this issue Sep 3, 2015 · 6 comments
Labels
need/community-input Needs input from the wider community

Comments

@jbenet
Copy link
Member

jbenet commented Sep 3, 2015

So far, we've only been handling "regular files" and "directories". We've recently added symlink support (#1627, thanks @whyrusleeping). Named pipes and other special files are still not supported and continue to hang (#1072).

  • ipfs shouldn't hang
  • we should decide how to handle them.

i think git ignores everything else. But since ipfs is more general than git (i.e. we may store filesystems representing containers or entire VMs) we must go through all special files and decide how to handle them. (I suspect that -- to properly represent containers and VMs -- we will need to be able to ingest + reproduce them all). Worth mentioning that we should be able to handle other non-UNIX platform-specific things in an extensible way, like solaris Doors, xattrs in linux/bsd/aix/osx, and so on.

I suggest the following process:

  • enumerate all filesystem files + attributes that we may want to track
    • defer most things (like MIME types, xattrs, etc) to the "Metadata" object
  • suggest patches to unixfs that will address the requirements
  • select one + implement it

The standard file types in UNIX are (am i missing any?):

  • Regular files. added as unixfs File type.
  • Directories. added as unixfs Dir types.
  • Symlinks. added as unixfs Symlink type
  • Named pipe. (unixplex pipe)
  • (Unix) Sockets. (duplex pipe)
  • Device files.

Non-UNIX but widely used:

  • Doors in Solaris
  • xattrs in Linux/BSD/OSX/AIX/...
  • whatever windows does

Transparent resolution across object shards

This is not super relevant, but comes to bear here. We will have to teach tools to transparently resolve across shards. This is already done for "chunked files" (i.e. files that are "large" and thus sharded across multiple objects). And we will have to do it for "chunked dirs" too (not yet supported). (Other datastructures, like keychain's Signatures will need similar resolving as well).

FWIW, most git tools do this transparent resolution for the commit.tree pairing-- that is, commits have one tree, so referencing <git-commit>/foo/bar really means <git-commit>/tree/foo/bar in most git tools, including github.

cc @whyrusleeping @rht @wking @tv42 @mildred

@mildred
Copy link
Contributor

mildred commented Sep 3, 2015

You can add to the list resource forks

@tv42
Copy link
Contributor

tv42 commented Oct 19, 2015

Resource forks are just bastard xattrs, these days. The only difference is that they run the API as a "write B at offset N" instead of "replace with value B". See https://godoc.org/bazil.org/fuse#SetxattrRequest Position.

@tv42
Copy link
Contributor

tv42 commented Oct 19, 2015

Also, Apple wants people to use sqlite or something, and not resource forks, these days.

@em-ly em-ly added the need/community-input Needs input from the wider community label Aug 25, 2016
@crackcomm
Copy link

@jbenet I can see permissions are entirely discarded in unixfs spec and implementation, obviously mainly because there is no way to use them properly, all the time. Files with different permissions will have different hashes in the end but that is not a big problem. Lack of permissions in IPFS file system does not help anyway. Many important use cases are impossible because of this gap.

Personally I am waiting for the day I can host entire linux on IPFS. Currently IPFS would be but cannot be used in container runtimes.

@cchris-org
Copy link

I stuck in same issue. the only solution for me is tar whole container:
tar . -c I ipfs tar add
sorry, no pipe symbol on my phone :)
but this could not be a permanent solution.

@magik6k
Copy link
Member

magik6k commented Sep 23, 2017

The plan to address this issue is currently discussed in ipld/legacy-unixfs-v2#1

@momack2 momack2 added this to Inbox in ipfs/go-ipfs May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/community-input Needs input from the wider community
Projects
No open projects
Development

No branches or pull requests

7 participants