Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f5989b9
Add MFS command line options, extend existing mount functions for MFS…
gsergey418 Apr 7, 2025
47aa0f0
Directory listing and file stat.
gsergey418 Apr 8, 2025
6fee6d5
Add a read-only MFS view.
gsergey418 Apr 10, 2025
5e04696
Add mkdir and interface checks.
gsergey418 Apr 10, 2025
cda7cf7
Add remove and rename functionality.
gsergey418 Apr 10, 2025
5b9deba
Implement all required write interfaces.
gsergey418 Apr 11, 2025
6e1a455
Adjust mount functions for other architechtures.
gsergey418 Apr 11, 2025
d1b4cc1
Merge branch 'master' into feat/10710-mfs-fuse-mount
gsergey418 Apr 11, 2025
759021b
Merge branch 'master' into feat/10710-mfs-fuse-mount
gsergey418 Apr 11, 2025
d4cdb93
Write a basic read/write test.
gsergey418 Apr 11, 2025
8bba26e
Write more basic tests, add a mutex to the file object, fix modtime.
gsergey418 Apr 14, 2025
d7342aa
Add a concurrency test, remove mutexes from file and directory struct…
gsergey418 Apr 14, 2025
c64cfff
Refactor naming(mfdir -> mfsdir) and add documentation.
gsergey418 Apr 22, 2025
7e57b85
Add CID retrieval through ipfs_cid xattr.
gsergey418 Apr 22, 2025
3a1bf22
Merge branch 'master' into feat/10710-mfs-fuse-mount
guillaumemichel Apr 25, 2025
6424872
Add docs, add xattr listing, fix bugs for mv and stat, refactor.
gsergey418 Apr 28, 2025
c579d85
Add MFS command line options, extend existing mount functions for MFS…
gsergey418 May 5, 2025
63852d9
docs phrasing
guillaumemichel May 6, 2025
5a0cf17
Merge master into feat/10710-mfs-fuse-mount
lidel May 6, 2025
a24fa2f
docs: Mounts.MFS
lidel May 6, 2025
a830433
docs: warn about lazy-loaded DAGs
lidel May 6, 2025
7f17080
test: TEST_FUSE=1 ./t0030-mount.sh -v
lidel May 6, 2025
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
10 changes: 9 additions & 1 deletion cmd/ipfs/kubo/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
initProfileOptionKwd = "init-profile"
ipfsMountKwd = "mount-ipfs"
ipnsMountKwd = "mount-ipns"
mfsMountKwd = "mount-mfs"
migrateKwd = "migrate"
mountKwd = "mount"
offlineKwd = "offline" // global option
Expand Down Expand Up @@ -173,6 +174,7 @@
cmds.BoolOption(mountKwd, "Mounts IPFS to the filesystem using FUSE (experimental)"),
cmds.StringOption(ipfsMountKwd, "Path to the mountpoint for IPFS (if using --mount). Defaults to config setting."),
cmds.StringOption(ipnsMountKwd, "Path to the mountpoint for IPNS (if using --mount). Defaults to config setting."),
cmds.StringOption(mfsMountKwd, "Path to the mountpoint for MFS (if using --mount). Defaults to config setting."),
cmds.BoolOption(unrestrictedAPIAccessKwd, "Allow RPC API access to unlisted hashes"),
cmds.BoolOption(unencryptTransportKwd, "Disable transport encryption (for debugging protocols)"),
cmds.BoolOption(enableGCKwd, "Enable automatic periodic repo garbage collection"),
Expand Down Expand Up @@ -1058,17 +1060,23 @@
nsdir = cfg.Mounts.IPNS
}

mfdir, found := req.Options[mfsMountKwd].(string)
Comment thread
guillaumemichel marked this conversation as resolved.
Outdated
if !found {
mfdir = cfg.Mounts.MFS
}

Check warning on line 1066 in cmd/ipfs/kubo/daemon.go

View check run for this annotation

Codecov / codecov/patch

cmd/ipfs/kubo/daemon.go#L1063-L1066

Added lines #L1063 - L1066 were not covered by tests

node, err := cctx.ConstructNode()
if err != nil {
return fmt.Errorf("mountFuse: ConstructNode() failed: %s", err)
}

err = nodeMount.Mount(node, fsdir, nsdir)
err = nodeMount.Mount(node, fsdir, nsdir, mfdir)

Check warning on line 1073 in cmd/ipfs/kubo/daemon.go

View check run for this annotation

Codecov / codecov/patch

cmd/ipfs/kubo/daemon.go#L1073

Added line #L1073 was not covered by tests
if err != nil {
return err
}
fmt.Printf("IPFS mounted at: %s\n", fsdir)
fmt.Printf("IPNS mounted at: %s\n", nsdir)
fmt.Printf("MFS mounted at: %s\n", mfdir)

Check warning on line 1079 in cmd/ipfs/kubo/daemon.go

View check run for this annotation

Codecov / codecov/patch

cmd/ipfs/kubo/daemon.go#L1079

Added line #L1079 was not covered by tests
return nil
}

Expand Down
1 change: 1 addition & 0 deletions config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
Mounts: Mounts{
IPFS: "/ipfs",
IPNS: "/ipns",
MFS: "/mfs",

Check warning on line 61 in config/init.go

View check run for this annotation

Codecov / codecov/patch

config/init.go#L61

Added line #L61 was not covered by tests
},

Ipns: Ipns{
Expand Down
1 change: 1 addition & 0 deletions config/mounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ package config
type Mounts struct {
IPFS string
IPNS string
MFS string
FuseAllowOther bool
}
10 changes: 9 additions & 1 deletion core/commands/mount_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
const (
mountIPFSPathOptionName = "ipfs-path"
mountIPNSPathOptionName = "ipns-path"
mountMFSPathOptionName = "mfs-path"
)

var MountCmd = &cmds.Command{
Expand Down Expand Up @@ -81,6 +82,7 @@ baz
Options: []cmds.Option{
cmds.StringOption(mountIPFSPathOptionName, "f", "The path where IPFS should be mounted."),
cmds.StringOption(mountIPNSPathOptionName, "n", "The path where IPNS should be mounted."),
cmds.StringOption(mountMFSPathOptionName, "m", "The path where MFS should be mounted."),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
cfg, err := env.(*oldcmds.Context).GetConfig()
Expand Down Expand Up @@ -109,7 +111,12 @@ baz
nsdir = cfg.Mounts.IPNS // NB: be sure to not redeclare!
}

err = nodeMount.Mount(nd, fsdir, nsdir)
mfdir, found := req.Options[mountMFSPathOptionName].(string)
Comment thread
guillaumemichel marked this conversation as resolved.
Outdated
if !found {
nsdir = cfg.Mounts.MFS
}

err = nodeMount.Mount(nd, fsdir, nsdir, mfdir)
if err != nil {
return err
}
Expand All @@ -124,6 +131,7 @@ baz
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, mounts *config.Mounts) error {
fmt.Fprintf(w, "IPFS mounted at: %s\n", cmdenv.EscNonPrint(mounts.IPFS))
fmt.Fprintf(w, "IPNS mounted at: %s\n", cmdenv.EscNonPrint(mounts.IPNS))
fmt.Fprintf(w, "MFS mounted at: %s\n", cmdenv.EscNonPrint(mounts.MFS))

return nil
}),
Expand Down
1 change: 1 addition & 0 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ type IpfsNode struct {
type Mounts struct {
Ipfs mount.Mount
Ipns mount.Mount
Mfs mount.Mount
}

// Close calls Close() on the App object
Expand Down
5 changes: 5 additions & 0 deletions docs/changelogs/v0.35.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This release was brought to you by the [Shipyard](http://ipshipyard.com/) team.
- [Dedicated `Reprovider.Strategy` for MFS](#dedicated-reproviderstrategy-for-mfs)
- [Additional new configuration options](#additional-new-configuration-options)
- [Grid view in WebUI](#grid-view-in-webui)
- [Expose MFS as FUSE mount point](#expose-mfs-as-fuse-mount-point)
- [📦️ Important dependency updates](#-important-dependency-updates)
- [📝 Changelog](#-changelog)
- [👨‍👩‍👧‍👦 Contributors](#-contributors)
Expand Down Expand Up @@ -42,6 +43,10 @@ The WebUI, accessible at http://127.0.0.1:5001/webui/, now includes support for

> ![image](https://github.com/user-attachments/assets/80dcf0d0-8103-426f-ae91-416fb25d32b6)

#### Expose MFS as a FUSE mount point

The MFS root is now available as a read/write FUSE mount point at `/mfs`. This filesystem is mounted in the same way as `/ipfs` and `/ipns` when running `ipfs mount` or `ipfs daemon --mount`.
Comment thread
guillaumemichel marked this conversation as resolved.
Outdated

#### 📦️ Important dependency updates

- update `ipfs-webui` to [v4.7.0](https://github.com/ipfs/ipfs-webui/releases/tag/v4.7.0)
Expand Down
Loading
Loading