dittofs

module
v0.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: MIT

README

DittoFS

Go Version Nix Flake Go Report Card Status

Tests

A modular virtual filesystem written entirely in Go

NFSv3/v4.0/v4.1/v4.2 and SMB2/3 servers in userspace — no FUSE, no kernel modules — with pluggable metadata and block stores you can mix and match per share.

Website • Quick Start • Documentation • Features • Contributing


⚠️ Experimental software, pre-1.0. Not production ready. No security audit has been performed. APIs and on-disk formats may change without notice. Do not use for data you cannot afford to lose. See Security and FAQ.

What is DittoFS?

Traditional file servers are welded to one storage layer and one access protocol. DittoFS separates the two. A single server process can:

  • Speak NFSv3, NFSv4.0, NFSv4.1, NFSv4.2, and SMB2/3 at the same time, over the same data.
  • Store metadata in BadgerDB, on disk or fully in memory — one store per share.
  • Store file content in one block store (S3 or memory) per share, fronted by an on-disk journal that absorbs writes, with an async syncer between them.
  • Run entirely in userspace — no FUSE, no kernel modules, no special privileges.

Everything is built from named, reusable stores wired together into shares. Two binaries drive it:

Binary Role
dfs The server daemon — runs the protocol adapters and a control-plane REST API.
dfsctl The REST client — manages users, groups, shares, stores, and adapters on a running server.

Features

Area Status
NFSv3 All 28 core procedures; embedded portmapper + mount protocol; NLM/NSM byte-range locking over TCP+UDP (opt-in)
NFSv4.0 Compound ops, ACLs, delegations, built-in byte-range locking
NFSv4.1 Sessions, sequence slots, backchannel
NFSv4.2 Extended attributes (RFC 8276); sparse files — ALLOCATE/DEALLOCATE/SEEK/READ_PLUS; CLONE/reflink (RFC 7862)
SMB 2.0.2 / 2.1 / 3.0 / 3.0.2 / 3.1.1 Multi-dialect negotiation, preauth integrity, compound requests
SMB3 encryption AES-128/256-GCM and AES-128/256-CCM
SMB3 signing AES-128-CMAC / AES-128-GMAC (HMAC-SHA256 for 2.x)
SMB leases & oplocks Leases V2 with directory leasing; oplocks; byte-range locks
SMB durable handles V1 and V2 for session resilience
SMB security descriptors Windows ACL mapping via a shared cross-protocol ACL model
Authentication AUTH_UNIX + Kerberos (RPCSEC_GSS) for NFS; NTLM + Kerberos (SPNEGO) for SMB
Active Directory Kerberos service keytab for AD-issued tickets; optional machine account (offline or online domain join) for NTLM pass-through; LDAP idmap (idmap_ad / idmap_rid) maps AD users and nested groups to the same Unix UID/GID over SMB and NFS
Cross-protocol coordination Bidirectional lease/delegation breaks between SMB and NFS
Metadata stores BadgerDB (on disk, or in memory for tests) — one per share. A distributed transactional KV store (TiKV preferred) is planned for multi-node, not yet implemented
Block stores S3, memory. One per share, fronted by an on-disk journal. Per-share isolation, async sync
Client-side encryption Per-remote envelope encryption (AES-256-GCM / ChaCha20-Poly1305 / XChaCha20-Poly1305)
Share snapshots Point-in-time reference holds (no data copy) with restore
Control plane Unified users/groups, share permissions, REST API with JWT auth
Observability Prometheus metrics endpoint, structured JSON logging
Deployment Single static binary; Docker images; Kubernetes operator

DittoFS passes the pjdfstest POSIX suite at 99.99% (8,788/8,789) on the BadgerDB metadata store; the single expected failure is the NFSv3 32-bit timestamp limit (year 2106). See the FAQ for known limitations.

On the SMB side, DittoFS passes the Samba smbtorture and Microsoft Windows Protocol Test Suite (WPTS) conformance batteries on the implementable surface — every test that a single-node userspace VFS can satisfy. The remaining known-failures are genuinely out-of-scope features (RSVD shared-VHD, Service Witness clustering, Storage QoS, DFS namespaces, kernel oplocks, NTFS-internal pseudo-files) plus a handful of upstream-Samba known-fails; none are fixable protocol gaps. See docs/guide/smb.md and docs/guide/windows.md.

DittoFS PRO

The community edition is fully open source. DittoFS PRO adds a web management UI and commercial support on top of the same engine, for teams running DittoFS in production.

DittoFS PRO management console

Manage users, shares, stores, and protocol adapters from one console. Learn more at dittofs.io/pro.

Quick Start

Install

# Nix (temporary shell with dfs and dfsctl; no permanent install)
nix shell github:cubbit/dittofs

# Homebrew
brew tap cubbit/tap
brew install cubbit/tap/dfs cubbit/tap/dfsctl

# Quick install script (macOS / Linux)
curl -fsSL https://github.com/cubbit/dittofs/releases/latest/download/install.sh | sh

Docker, the Kubernetes operator, APT/YUM/Arch packages, and Scoop (Windows) are covered in docs/guide/install.md.

Build from source

git clone https://github.com/cubbit/dittofs.git
cd dittofs
go build -o dfs    cmd/dfs/main.go
go build -o dfsctl cmd/dfsctl/main.go

The commands below use the source-built binaries. With Nix, Homebrew, or the install script, use dfs and dfsctl without the ./ prefix.

First run & admin password

On first start, DittoFS creates an admin user. Pre-set the password via the DITTOFS_ADMIN_INITIAL_PASSWORD environment variable — this is the recommended path for every deployment, and the only reliable one for Docker/Kubernetes/CI and systemd:

./dfs init     # writes ~/.config/dittofs/config.yaml
# Replace the example with your own password before the first start.
# A supplied password also skips the forced password change on first login.
DITTOFS_ADMIN_INITIAL_PASSWORD=my-secure-password ./dfs start

If you don't pre-set it, a random password is generated — but it is shown only when you run ./dfs start --foreground in an interactive terminal (printed once). In background mode (the default ./dfs start), and under Docker/systemd where stdout is a pipe rather than a terminal, the generated password is not written to the log and cannot be recovered. Because the admin user is created on that first start, setting DITTOFS_ADMIN_INITIAL_PASSWORD and simply restarting will not change it — that variable is only read while bootstrapping a new admin. To recover, delete the admin row from the users table of the control-plane database and start again with the password pre-set; the next start re-runs the bootstrap. Do not delete the database itself — it also holds your shares, stores, mounts and other users. So: set it before the very first start.

Serve an NFS share in under a minute

# 1. Start the server (see above), then log in
./dfsctl login --server http://localhost:8080 --username admin

# 1a. Only if the admin password was generated: change it on first login.
# The bootstrap admin starts with a forced-password-change flag — until you
# clear it here, every other command (including `user create` below) is
# rejected with HTTP 403:
#   account "admin" must set a new password before performing other operations;
#   run 'dfsctl user change-password' (as "admin") to set one
# This forced change is skipped automatically when you set your own
# DITTOFS_ADMIN_INITIAL_PASSWORD at first start, and can be disabled entirely
# via controlplane.require_initial_password_change: false (see docs/guide/configuration.md).
./dfsctl user change-password

# 2. Create a user mapped to your host UID (needed for NFS write access)
./dfsctl user create --username $(whoami) --host-uid

# 3. Create the stores (interactive prompts collect paths / S3 credentials)
./dfsctl store metadata add --name default --type badger
./dfsctl store block add --name s3-remote --type s3

# 4. Create a share and grant access
./dfsctl share create --name /export --metadata default --block-store s3-remote
./dfsctl share permission grant /export --user $(whoami) --level read-write

# 5. Enable the NFS adapter
./dfsctl adapter enable nfs

# 6. Mount it
# Linux:
sudo mount -t nfs -o tcp,port=12049,mountport=12049 localhost:/export /mnt/nfs
# macOS:
sudo mount -t nfs -o tcp,port=12049,mountport=12049,resvport,nolock localhost:/export /tmp/nfs

echo "Hello DittoFS!" > /mnt/nfs/hello.txt

This uses persistent storage (BadgerDB metadata, S3 durable backend). Writes land in the share's on-disk journal first and sync to S3 in the background. For dependency-free local testing, use --in-memory for the metadata store and --type memory for the block store instead.

Mount an SMB share

SMB always requires user authentication:

./dfsctl user create --username alice            # password prompted
./dfsctl share permission grant /export --user alice --level read-write

# Linux (use a credentials file — never put passwords on the command line)
sudo mount -t cifs //localhost/export /mnt/smb \
  -o port=12445,credentials=$HOME/.smbcredentials,vers=3.1.1

# macOS (prompts for password)
mount -t smbfs //alice@localhost:12445/export /tmp/smb

See docs/guide/smb.md for dialect, encryption, and client details.

Default ports

Port Service
12049 NFS
12445 SMB
8080 Control-plane REST API (health checks, management)
9090 Prometheus metrics

Configuration model

DittoFS configuration has two layers:

  1. Server config file (~/.config/dittofs/config.yaml) — process-level infrastructure: logging, metrics, control-plane API, and the control-plane database. Environment variables with the DITTOFS_ prefix override any field (e.g. DITTOFS_LOGGING_LEVEL=DEBUG).
  2. Runtime resources (dfsctl / REST API) — stores, shares, adapters, users, groups, and permissions. These live in the control-plane database (SQLite by default, PostgreSQL for HA), not in the config file.
# ~/.config/dittofs/config.yaml
database:
  type: sqlite            # or "postgres" for HA
  sqlite:
    path: ~/.config/dittofs/controlplane.db   # default when omitted: $XDG_CONFIG_HOME/dittofs/controlplane.db

controlplane:
  port: 8080
  jwt:
    secret: "your-secret-key-at-least-32-characters"

Block storage is configured per share through the store CLI — each share points at one block store and owns an isolated journal directory beneath blockstore.journal.path. See docs/guide/configuration.md for the full reference.

Documentation

Full docs live in docs/, split by audience.

For users & operators — docs/guide/

Start here

Connect clients

Features & operations

For contributors — docs/internals/

Product

  • DittoFS Pro — the managed dashboard built on open-source DittoFS

Testing

test/harness/bin/dt run unit                     # the Go tests
test/harness/bin/dt services up postgres kmip localstack   # the services integration and e2e need
test/harness/bin/dt run integration
test/harness/bin/dt run e2e                      # Linux and root; dt doctor says what else is missing

docs/internals/testing.md is the guide: what each suite needs, how to run and read a run, and the conformance suites. The Windows checklists are in testing-windows.md. See also test/e2e/ and, for the benchmarks, bench/README.md.

Security

DittoFS is experimental and has not been professionally audited.

  • Authentication: AUTH_UNIX and Kerberos (RPCSEC_GSS) for NFS; NTLM and Kerberos (SPNEGO) for SMB. AD domain users can authenticate directly against a directory — see docs/guide/identity.md.
  • Transport encryption: SMB3 encrypts its transport (AES-GCM/CCM). NFS supports NFS-over-TLS (RFC 9289) and Kerberos privacy (krb5p); without either, run NFS over a VPN or a trusted network.
  • At-rest: optional client-side per-remote envelope encryption protects block content in the remote store. See docs/guide/encryption.md.

See docs/guide/security.md for the full picture and recommendations.

Contributing

Contributions are welcome — see docs/internals/contributing.md for development setup, code structure, and testing guidelines.

References

New to these protocols? Start with the Glossary for plain-language definitions, then dive into the authoritative specs below.

DittoFS Pro

DittoFS Pro is the premium edition: a modern web dashboard that brings the same capabilities as the dfsctl CLI — managing stores, shares, adapters, and access control — to a point-and-click web UI. It builds on this open-source server and ships as a single binary with the UI embedded. Learn more at dittofs.io.

DittoFS Pro dashboard

License

MIT — see LICENSE.

Directories

Path Synopsis
bench
workloads
Package workloads exposes the fio job files as an embedded filesystem so the dfsbench harness (cmd/bench) can materialize them on any target without the files needing to live next to the binary.
Package workloads exposes the fio job files as an embedded filesystem so the dfsbench harness (cmd/bench) can materialize them on any target without the files needing to live next to the binary.
cmd
bench command
Command dfsbench is the DittoFS-vs-competitors benchmark harness.
Command dfsbench is the DittoFS-vs-competitors benchmark harness.
dfs command
Tolerate X.509 certificates with negative serial numbers.
Tolerate X.509 certificates with negative serial numbers.
dfs/commands
Package commands implements the CLI commands for dittofs server management.
Package commands implements the CLI commands for dittofs server management.
dfs/commands/config
Package config implements configuration management subcommands.
Package config implements configuration management subcommands.
dfsctl command
dfsctl/cmdutil
Package cmdutil provides shared utilities for dfsctl commands.
Package cmdutil provides shared utilities for dfsctl commands.
dfsctl/commands
Package commands implements the CLI commands for dfsctl client.
Package commands implements the CLI commands for dfsctl client.
dfsctl/commands/adapter
Package adapter implements protocol adapter management commands.
Package adapter implements protocol adapter management commands.
dfsctl/commands/client
Package client implements unified client management commands.
Package client implements unified client management commands.
dfsctl/commands/context
Package context implements context management subcommands for dfsctl.
Package context implements context management subcommands for dfsctl.
dfsctl/commands/grace
Package grace implements NFSv4 grace period management commands.
Package grace implements NFSv4 grace period management commands.
dfsctl/commands/group
Package group implements group management commands for dfsctl.
Package group implements group management commands for dfsctl.
dfsctl/commands/identityprovider
Package identityprovider implements the `dfsctl identity-provider` command group for managing LDAP/AD and Kerberos identity providers over the REST API.
Package identityprovider implements the `dfsctl identity-provider` command group for managing LDAP/AD and Kerberos identity providers over the REST API.
dfsctl/commands/idmap
Package idmap implements identity mapping commands for dfsctl.
Package idmap implements identity mapping commands for dfsctl.
dfsctl/commands/netgroup
Package netgroup implements netgroup management commands for dfsctl.
Package netgroup implements netgroup management commands for dfsctl.
dfsctl/commands/netlogon
Package netlogon implements the `dfsctl netlogon` command group for inspecting and controlling the NETLOGON machine-account (SMB NTLM pass-through) subsystem on a running DittoFS server.
Package netlogon implements the `dfsctl netlogon` command group for inspecting and controlling the NETLOGON machine-account (SMB NTLM pass-through) subsystem on a running DittoFS server.
dfsctl/commands/quota
Package quota implements per-identity quota management commands for dfsctl.
Package quota implements per-identity quota management commands for dfsctl.
dfsctl/commands/settings
Package settings implements server settings management commands.
Package settings implements server settings management commands.
dfsctl/commands/share
Package share implements share management commands for dfsctl.
Package share implements share management commands for dfsctl.
dfsctl/commands/share/permission
Package permission implements share permission management commands.
Package permission implements share permission management commands.
dfsctl/commands/share/snapshot
Package snapshot implements share snapshot management commands.
Package snapshot implements share snapshot management commands.
dfsctl/commands/share/snapshotpolicy
Package snapshotpolicy implements share snapshot policy commands (schedule + retention) for dfsctl.
Package snapshotpolicy implements share snapshot policy commands (schedule + retention) for dfsctl.
dfsctl/commands/store
Package store implements store management commands for dfsctl.
Package store implements store management commands for dfsctl.
dfsctl/commands/store/block
Package block implements block store management commands.
Package block implements block store management commands.
dfsctl/commands/store/metadata
Package metadata implements metadata store management commands.
Package metadata implements metadata store management commands.
dfsctl/commands/system
Package system implements system-level management commands.
Package system implements system-level management commands.
dfsctl/commands/trash
Package trash implements the `dfsctl trash` command group for managing a share's recycle bin (#190): listing, restoring, emptying, and inspecting recycled roots.
Package trash implements the `dfsctl trash` command group for managing a share's recycle bin (#190): listing, restoring, emptying, and inspecting recycled roots.
dfsctl/commands/user
Package user implements user management commands for dfsctl.
Package user implements user management commands for dfsctl.
dt command
Command dt runs DittoFS's test suites from one registry, test/suites.yaml.
Command dt runs DittoFS's test suites from one registry, test/suites.yaml.
gendocs command
Command gendocs regenerates docs/guide/cli.md from the dfs and dfsctl Cobra command trees, so the CLI reference never drifts from the actual commands.
Command gendocs regenerates docs/guide/cli.md from the dfs and dfsctl Cobra command trees, so the CLI reference never drifts from the actual commands.
internal
adapter/common
Package common provides shared helpers used by every protocol adapter (NFSv3, NFSv4, SMB2/3) so that block-store resolution, pooled read buffers, and metadata→protocol error mapping live in exactly one place.
Package common provides shared helpers used by every protocol adapter (NFSv3, NFSv4, SMB2/3) so that block-store resolution, pooled read buffers, and metadata→protocol error mapping live in exactly one place.
adapter/nfs
connection.go provides shared RPC framing utilities used by both pkg/adapter/nfs (the NFSConnection layer) and potentially other components that need to parse RPC record-marking protocol frames.
connection.go provides shared RPC framing utilities used by both pkg/adapter/nfs (the NFSConnection layer) and potentially other components that need to parse RPC record-marking protocol frames.
adapter/nfs/middleware
Package middleware provides authentication extraction and future middleware components for the NFS adapter dispatch pipeline.
Package middleware provides authentication extraction and future middleware components for the NFS adapter dispatch pipeline.
adapter/nfs/mount
Package mount provides Mount protocol (program 100005) dispatch: the procedure table, the six procedure handlers, and the XDR encode/dispatch seam shared with the NFSv3 handlers.
Package mount provides Mount protocol (program 100005) dispatch: the procedure table, the six procedure handlers, and the XDR encode/dispatch seam shared with the NFSv3 handlers.
adapter/nfs/nlm
Package nlm provides Network Lock Manager (NLM) protocol dispatch.
Package nlm provides Network Lock Manager (NLM) protocol dispatch.
adapter/nfs/nlm/blocking
Package blocking implements the blocking lock queue for NLM protocol.
Package blocking implements the blocking lock queue for NLM protocol.
adapter/nfs/nlm/callback
Package callback provides the NLM callback client for GRANTED notifications.
Package callback provides the NLM callback client for GRANTED notifications.
adapter/nfs/nlm/handlers
Package handlers provides NLM (Network Lock Manager) procedure handlers.
Package handlers provides NLM (Network Lock Manager) procedure handlers.
adapter/nfs/nlm/types
Package types provides NLM (Network Lock Manager) protocol types and constants.
Package types provides NLM (Network Lock Manager) protocol types and constants.
adapter/nfs/nlm/xdr
Package xdr provides XDR encoding and decoding for NLM v4 protocol messages.
Package xdr provides XDR encoding and decoding for NLM v4 protocol messages.
adapter/nfs/nsm
Package nsm provides Network Status Monitor (NSM) protocol dispatch.
Package nsm provides Network Status Monitor (NSM) protocol dispatch.
adapter/nfs/nsm/callback
Package callback provides the NSM callback client for SM_NOTIFY notifications.
Package callback provides the NSM callback client for SM_NOTIFY notifications.
adapter/nfs/nsm/handlers
Package handlers provides NSM (Network Status Monitor) protocol handlers.
Package handlers provides NSM (Network Status Monitor) protocol handlers.
adapter/nfs/nsm/types
Package types provides NSM (Network Status Monitor) protocol types and constants.
Package types provides NSM (Network Status Monitor) protocol types and constants.
adapter/nfs/nsm/xdr
Package xdr provides XDR encoding/decoding for NSM protocol messages.
Package xdr provides XDR encoding/decoding for NSM protocol messages.
adapter/nfs/portmap
Package portmap provides an embedded portmapper (RFC 1057) service registry.
Package portmap provides an embedded portmapper (RFC 1057) service registry.
adapter/nfs/portmap/handlers
Package handlers provides portmapper procedure handler implementations.
Package handlers provides portmapper procedure handler implementations.
adapter/nfs/portmap/sysreg
Package sysreg registers DittoFS's RPC services (NFS, MOUNT, NLM, NSM) with an external system portmapper/rpcbind listening on the well-known port 111.
Package sysreg registers DittoFS's RPC services (NFS, MOUNT, NLM, NSM) with an external system portmapper/rpcbind listening on the well-known port 111.
adapter/nfs/portmap/types
Package types provides portmapper protocol types and constants.
Package types provides portmapper protocol types and constants.
adapter/nfs/portmap/xdr
Package xdr provides XDR encoding and decoding for portmapper protocol messages.
Package xdr provides XDR encoding and decoding for portmapper protocol messages.
adapter/nfs/rpc/gss
Package gss provides RPCSEC_GSS krb5i (integrity) wrapping and unwrapping.
Package gss provides RPCSEC_GSS krb5i (integrity) wrapping and unwrapping.
adapter/nfs/v3
Package v3 provides NFS version 3 (program 100003) dispatch: the procedure table, the twenty-two procedure thunks that adapt each wire call to a handler in v3/handlers, and the generic decode/handle/encode seam they share.
Package v3 provides NFS version 3 (program 100003) dispatch: the procedure table, the twenty-two procedure thunks that adapt each wire call to a handler in v3/handlers, and the generic decode/handle/encode seam they share.
adapter/nfs/v3/handlers/testing
Package testing provides test fixtures for NFS v3 handler behavioral tests.
Package testing provides test fixtures for NFS v3 handler behavioral tests.
adapter/nfs/v4/attrs
Package attrs provides NFSv4 attribute bitmap helpers and FATTR4 encoding.
Package attrs provides NFSv4 attribute bitmap helpers and FATTR4 encoding.
adapter/nfs/v4/handlers
Package handlers implements NFSv4 COMPOUND operation dispatch and individual operation handlers.
Package handlers implements NFSv4 COMPOUND operation dispatch and individual operation handlers.
adapter/nfs/v4/pseudofs
Package pseudofs implements the NFSv4 pseudo-filesystem virtual namespace.
Package pseudofs implements the NFSv4 pseudo-filesystem virtual namespace.
adapter/nfs/v4/state
Package state implements NFSv4 state management for client identity, open state, lock state, and lease tracking per RFC 7530 Section 9.
Package state implements NFSv4 state management for client identity, open state, lock state, and lease tracking per RFC 7530 Section 9.
adapter/nfs/v4/types
Package types - NFSv4.1 BACKCHANNEL_CTL operation types.
Package types - NFSv4.1 BACKCHANNEL_CTL operation types.
adapter/nfs/v4/v41/handlers
Package handlers -- BACKCHANNEL_CTL operation handler (op 40).
Package handlers -- BACKCHANNEL_CTL operation handler (op 40).
adapter/nfs/xdr/core
Package xdr provides generic XDR (External Data Representation) encoding and decoding utilities per RFC 4506.
Package xdr provides generic XDR (External Data Representation) encoding and decoding utilities per RFC 4506.
adapter/pool
Package pool provides a tiered buffer pool for efficient memory reuse.
Package pool provides a tiered buffer pool for efficient memory reuse.
adapter/smb
Package smb provides SMB2 protocol dispatch and result types.
Package smb provides SMB2 protocol dispatch and result types.
adapter/smb/auth
Package auth provides authentication for SMB protocol adapters.
Package auth provides authentication for SMB protocol adapters.
adapter/smb/encryption
Vendored CCM (Counter with CBC-MAC) cipher.AEAD implementation.
Vendored CCM (Counter with CBC-MAC) cipher.AEAD implementation.
adapter/smb/handlers
Package handlers provides SMB2 command handlers and session management.
Package handlers provides SMB2 command handlers and session management.
adapter/smb/header
Package header provides SMB2 message header parsing and encoding.
Package header provides SMB2 message header parsing and encoding.
adapter/smb/kdf
Package kdf implements SP800-108 Counter Mode KDF with HMAC-SHA256 for SMB 3.x session key derivation.
Package kdf implements SP800-108 Counter Mode KDF with HMAC-SHA256 for SMB 3.x session key derivation.
adapter/smb/lease
Package lease provides the thin SMB LeaseManager wrapper.
Package lease provides the thin SMB LeaseManager wrapper.
adapter/smb/rpc
Package rpc implements DCE/RPC protocol for SMB named pipes.
Package rpc implements DCE/RPC protocol for SMB named pipes.
adapter/smb/session
Package session provides SMB2 session and credit management.
Package session provides SMB2 session and credit management.
adapter/smb/signing
Package signing provides SMB2 message signing abstractions.
Package signing provides SMB2 message signing abstractions.
adapter/smb/smbenc
Package smbenc provides binary encoding and decoding utilities for the SMB2/3 wire protocol.
Package smbenc provides binary encoding and decoding utilities for the SMB2/3 wire protocol.
adapter/smb/types
Package types contains SMB2 protocol constants, types, and error codes.
Package types contains SMB2 protocol constants, types, and error codes.
adapter/testruntime
Package testruntime builds the control-plane runtime fixtures shared by the protocol adapter and control-plane tests.
Package testruntime builds the control-plane runtime fixtures shared by the protocol adapter and control-plane tests.
auth/kerberos
Package kerberos provides the shared Kerberos service layer used by both NFS RPCSEC_GSS and SMB SESSION_SETUP for AP-REQ verification, session key extraction, AP-REP mutual authentication, and authenticator replay detection.
Package kerberos provides the shared Kerberos service layer used by both NFS RPCSEC_GSS and SMB SESSION_SETUP for AP-REQ verification, session key extraction, AP-REP mutual authentication, and authenticator replay detection.
cli/credentials
Package credentials provides credential storage and context management for dfsctl.
Package credentials provides credential storage and context management for dfsctl.
cli/health
Package health provides shared types for health check responses.
Package health provides shared types for health check responses.
cli/output
Package output provides output formatting utilities for CLI commands.
Package output provides output formatting utilities for CLI commands.
cli/prompt
Package prompt provides interactive terminal prompts for CLI commands.
Package prompt provides interactive terminal prompts for CLI commands.
cli/timeutil
Package timeutil provides time formatting utilities for CLI output.
Package timeutil provides time formatting utilities for CLI output.
controlplane/api/auth
Package auth provides JWT authentication functionality for the DittoFS API.
Package auth provides JWT authentication functionality for the DittoFS API.
controlplane/api/handlers
Package handlers provides HTTP handlers for the DittoFS API.
Package handlers provides HTTP handlers for the DittoFS API.
controlplane/api/middleware
Package middleware provides HTTP middleware for the DittoFS API.
Package middleware provides HTTP middleware for the DittoFS API.
dfsbench/sysstat
Package sysstat samples system-wide CPU and context-switch counters from /proc/stat, so each benchmark cell can report the serving stack's context switches per second — the measured evidence for the "DittoFS's native server avoids the FUSE context-switch tax" thesis.
Package sysstat samples system-wide CPU and context-switch counters from /proc/stat, so each benchmark cell can report the serving stack's context switches per second — the measured evidence for the "DittoFS's native server avoids the FUSE context-switch tax" thesis.
mfsymlink
Package mfsymlink implements Minshall+French symlinks (MFsymlinks) encoding and decoding.
Package mfsymlink implements Minshall+French symlinks (MFsymlinks) encoding and decoding.
sysinfo
Package sysinfo provides platform-aware system resource detection.
Package sysinfo provides platform-aware system resource detection.
tlsconfig
Package tlsconfig provides shared, file-based TLS plumbing for DittoFS servers (the control-plane API and the NFS adapter).
Package tlsconfig provides shared, file-based TLS plumbing for DittoFS servers (the control-plane API and the NFS adapter).
pkg
adapter
Package adapter provides protocol adapter interfaces for DittoFS.
Package adapter provides protocol adapter interfaces for DittoFS.
adapter/nfs/identity
Package identity provides pluggable identity resolution for NFSv4 principals and Kerberos authentication.
Package identity provides pluggable identity resolution for NFSv4 principals and Kerberos authentication.
adapter/sidecar
Package sidecar defines a small abstraction for the companion protocol services that run alongside a main protocol adapter.
Package sidecar defines a small abstraction for the companion protocol services that run alongside a main protocol adapter.
apiclient
Package apiclient provides a REST API client for dfsctl.
Package apiclient provides a REST API client for dfsctl.
auth
Package auth is the single home for DittoFS's authentication model: the Result an authentication mechanism produces, and the Translator interface each mechanism implements.
Package auth is the single home for DittoFS's authentication model: the Result an authentication mechanism produces, and the Translator interface each mechanism implements.
auth/kerberos
Package kerberos provides Kerberos keytab and configuration state for DittoFS.
Package kerberos provides Kerberos keytab and configuration state for DittoFS.
auth/sid
Package sid provides Windows Security Identifier (SID) types, encoding, decoding, and mapping for cross-protocol identity interoperability.
Package sid provides Windows Security Identifier (SID) types, encoding, decoding, and mapping for cross-protocol identity interoperability.
block
Package block is the shared vocabulary of the block layer: content hashes, chunk and manifest types, block state, the error sentinels and the on-disk format-version convention.
Package block is the shared vocabulary of the block layer: content hashes, chunk and manifest types, block state, the error sentinels and the on-disk format-version convention.
block/blockcodec
Package blockcodec implements the DittoFS block wire format: a streaming framing layer that packs one or more chunk records into a single block object.
Package blockcodec implements the DittoFS block wire format: a streaming framing layer that packs one or more chunk records into a single block object.
block/blockstoretest
Package blockstoretest provides the conformance suite for the block-keyed remote store contract, pkg/block/remote.RemoteBlockStore.
Package blockstoretest provides the conformance suite for the block-keyed remote store contract, pkg/block/remote.RemoteBlockStore.
block/carver
Package carver cuts a contiguous byte stream into FastCDC chunks, hashes them, consults a per-chunk skip oracle, and accumulates the novel chunk bytes into block-sized batches.
Package carver cuts a contiguous byte stream into FastCDC chunks, hashes them, consults a per-chunk skip oracle, and accumulates the novel chunk bytes into block-sized batches.
block/chunker
Package chunker implements FastCDC content-defined chunking (Xia et al.
Package chunker implements FastCDC content-defined chunking (Xia et al.
block/engine
Package engine provides the Store orchestrator that composes local store, remote store, syncer, read buffer / prefetcher, and block garbage collection into the block.Store interface.
Package engine provides the Store orchestrator that composes local store, remote store, syncer, read buffer / prefetcher, and block garbage collection into the block.Store interface.
block/gc
Package gc — audit
Package gc — audit
block/journal
Package journal is the local block cache for a share: it packs many files into a small set of shared, append-only segment files on disk and mediates between dirty client writes, fsync-durable checkpoints, flushing to a remote store, pressure-gated eviction, and garbage collection.
Package journal is the local block cache for a share: it packs many files into a small set of shared, append-only segment files on disk and mediates between dirty client writes, fsync-durable checkpoints, flushing to a remote store, pressure-gated eviction, and garbage collection.
block/journal/journaltest
Package journaltest opens throwaway journal stores for tests that live outside pkg/block/journal and need a real local tier rather than a stand-in.
Package journaltest opens throwaway journal stores for tests that live outside pkg/block/journal and need a real local tier rather than a stand-in.
block/middleware
Package middleware composes the transforms a block body passes through on its way to and from a remote store.
Package middleware composes the transforms a block body passes through on its way to and from a remote store.
block/middleware/compression
Package compression — the compression stage of a block middleware pipeline.
Package compression — the compression stage of a block middleware pipeline.
block/middleware/encryption
Package encryption — the encryption stage of a block middleware pipeline.
Package encryption — the encryption stage of a block middleware pipeline.
block/middleware/encryption/keyprovider
Package keyprovider defines the master-key custody surface used by the encryption decorator.
Package keyprovider defines the master-key custody surface used by the encryption decorator.
block/remote
Package remote declares the production remote-store contract.
Package remote declares the production remote-store contract.
block/remote/memory
Package memory provides an in-memory RemoteStore implementation for testing.
Package memory provides an in-memory RemoteStore implementation for testing.
block/remote/s3
Package s3 provides an S3-backed RemoteStore implementation.
Package s3 provides an S3-backed RemoteStore implementation.
block/syncer
Package syncer holds the upload-window mechanism: a semaphore whose limit can be resized while slots are held, and the goodput controller that decides the limit.
Package syncer holds the upload-window mechanism: a semaphore whose limit can be resized while slots are held, and the goodput controller that decides the limit.
controlplane
Package controlplane provides the control plane for DittoFS.
Package controlplane provides the control plane for DittoFS.
controlplane/api/dto
Package dto holds the wire-level data transfer objects shared between the REST handlers and the typed apiclient.
Package dto holds the wire-level data transfer objects shared between the REST handlers and the typed apiclient.
controlplane/models
Package models provides shared domain types for DittoFS control plane.
Package models provides shared domain types for DittoFS control plane.
controlplane/runtime
Package runtime provides runtime state management for the control plane.
Package runtime provides runtime state management for the control plane.
controlplane/runtime/adapters
Package adapters provides protocol adapter lifecycle management.
Package adapters provides protocol adapter lifecycle management.
controlplane/runtime/blockstoreprobe
Package blockstoreprobe runs one-shot health probes against a models.BlockStoreConfig and converts the result into a health.Report.
Package blockstoreprobe runs one-shot health probes against a models.BlockStoreConfig and converts the result into a health.Report.
controlplane/runtime/clients
Package clients provides a thread-safe registry for tracking connected protocol clients (NFS, SMB) with automatic TTL-based stale cleanup.
Package clients provides a thread-safe registry for tracking connected protocol clients (NFS, SMB) with automatic TTL-based stale cleanup.
controlplane/runtime/identity
Package identity provides share-level identity mapping.
Package identity provides share-level identity mapping.
controlplane/runtime/lifecycle
Package lifecycle provides server startup and shutdown orchestration.
Package lifecycle provides server startup and shutdown orchestration.
controlplane/runtime/mounts
Package mounts provides unified mount tracking across all protocol adapters.
Package mounts provides unified mount tracking across all protocol adapters.
controlplane/runtime/shares
Package shares provides share registry and lifecycle management.
Package shares provides share registry and lifecycle management.
controlplane/runtime/snapshotsched
Package snapshotsched implements the background snapshot scheduler: a process-local ticker that creates per-share snapshots on the cadence defined by each share's SnapshotPolicy and prunes scheduler-created snapshots beyond the policy's retention bounds (keep_last and TTL).
Package snapshotsched implements the background snapshot scheduler: a process-local ticker that creates per-share snapshots on the cadence defined by each share's SnapshotPolicy and prunes scheduler-created snapshots beyond the policy's retention bounds (keep_last and TTL).
controlplane/runtime/stores
Package stores provides metadata store registry management.
Package stores provides metadata store registry management.
controlplane/runtime/trash
Package trash implements the runtime recycle-bin service: listing, restoring, and emptying the per-share #recycle bin populated by the metadata layer when trash is enabled.
Package trash implements the runtime recycle-bin service: listing, restoring, and emptying the per-share #recycle bin populated by the metadata layer when trash is enabled.
controlplane/store
Package store provides the control plane persistence layer.
Package store provides the control plane persistence layer.
discovery/hostinfo
Package hostinfo resolves the identity and network facts a discovery advertiser needs: the server's advertised name, the multicast-capable interfaces, and the host's IP addresses.
Package hostinfo resolves the identity and network facts a discovery advertiser needs: the server's advertised name, the multicast-capable interfaces, and the host's IP addresses.
discovery/mdns
Package mdns implements a minimal multicast-DNS / DNS-SD responder (RFC 6762 / RFC 6763) that advertises DittoFS's SMB and NFS services so they appear in macOS Finder and Linux/Avahi file browsers.
Package mdns implements a minimal multicast-DNS / DNS-SD responder (RFC 6762 / RFC 6763) that advertises DittoFS's SMB and NFS services so they appear in macOS Finder and Linux/Avahi file browsers.
discovery/wsd
Package wsd implements a minimal WS-Discovery host responder so DittoFS's SMB service appears in the Windows Explorer "Network" view.
Package wsd implements a minimal WS-Discovery host responder so DittoFS's SMB service appears in the Windows Explorer "Network" view.
health
Package health defines the common health-reporting types used by stores, adapters, and shares.
Package health defines the common health-reporting types used by stores, adapters, and shares.
identity
Package identity provides pluggable identity resolution for DittoFS.
Package identity provides pluggable identity resolution for DittoFS.
identity/kerberos
Package kerberos provides a Kerberos identity provider for DittoFS.
Package kerberos provides a Kerberos identity provider for DittoFS.
identity/ldap
Package ldap provides an LDAP/Active Directory identity provider for DittoFS.
Package ldap provides an LDAP/Active Directory identity provider for DittoFS.
metadata
Package metadata — synced_hash_store.go.
Package metadata — synced_hash_store.go.
metadata/acl
Package acl implements NFSv4 Access Control List types, evaluation, validation, mode synchronization, and inheritance per RFC 7530 Section 6.
Package acl implements NFSv4 Access Control List types, evaluation, validation, mode synchronization, and inheritance per RFC 7530 Section 6.
metadata/backup
Package backup provides the shared binary envelope format for DittoFS metadata backup streams.
Package backup provides the shared binary envelope format for DittoFS metadata backup streams.
metadata/errors
Package errors provides error types and error codes for the metadata package.
Package errors provides error types and error codes for the metadata package.
metadata/lock
Package lock provides lock management types and operations for the metadata package.
Package lock provides lock management types and operations for the metadata package.
metadata/store/badger/badgertest
Package badgertest opens Badger metadata stores for tests.
Package badgertest opens Badger metadata stores for tests.
metadata/store/basestore
Package basestore holds backend-agnostic pieces of the metadata store: per-identity usage accounting, the default filesystem capabilities, and file-handle minting.
Package basestore holds backend-agnostic pieces of the metadata store: per-identity usage accounting, the default filesystem capabilities, and file-handle minting.
metadata/store/internal/gencache
Package gencache provides the generation-guarded, populate-after-commit cache the metadata store uses for its read hot paths.
Package gencache provides the generation-guarded, populate-after-commit cache the metadata store uses for its read hot paths.
metadata/store/internal/sharecache
Package sharecache caches decoded ShareOptions for the permission hot path, shared by every metadata backend.
Package sharecache caches decoded ShareOptions for the permission hot path, shared by every metadata backend.
metadata/store/internal/txretry
Package txretry holds the transient-conflict backoff for the metadata store's transaction retry loops.
Package txretry holds the transient-conflict backoff for the metadata store's transaction retry loops.
metadata/storetest
Package storetest provides a conformance test suite for metadata store implementations.
Package storetest provides a conformance test suite for metadata store implementations.
metrics
Package metrics provides the DittoFS Prometheus metrics surface: an owned registry, a dedicated /metrics HTTP listener, and read-through collectors that expose existing runtime state as Prometheus series at scrape time.
Package metrics provides the DittoFS Prometheus metrics surface: an owned registry, a dedicated /metrics HTTP listener, and read-through collectors that expose existing runtime state as Prometheus series at scrape time.
netutil
Package netutil holds small, dependency-free networking helpers shared across the control plane and protocol adapters.
Package netutil holds small, dependency-free networking helpers shared across the control plane and protocol adapters.
schedule
Package schedule provides the snapshot cadence parser used by the snapshot policy server-side validation.
Package schedule provides the snapshot cadence parser used by the snapshot policy server-side validation.
snapshot
Package snapshot owns the on-disk hash manifest format used by the snapshot lifecycle in pkg/controlplane/runtime.
Package snapshot owns the on-disk hash manifest format used by the snapshot lifecycle in pkg/controlplane/runtime.
Command update-nix-hash automatically updates the vendorHash in flake.nix after Go dependencies have changed.
Command update-nix-hash automatically updates the vendorHash in flake.nix after Go dependencies have changed.
test
harness/fixture
Package fixture sets up the DittoFS server a cell's tests run against: dfs from {bin}, on a store profile, with the default share, its users and its adapter settings.
Package fixture sets up the DittoFS server a cell's tests run against: dfs from {bin}, on a store profile, with the default share, its users and its adapter settings.
harness/history
Package history reads past dt runs, from a checkout's results or from what the develop runs of the tests workflow uploaded, and counts how each suite and each test went over them (docs/internals/rfcs/rfc-29-test-harness.md).
Package history reads past dt runs, from a checkout's results or from what the develop runs of the tests workflow uploaded, and counts how each suite and each test went over them (docs/internals/rfcs/rfc-29-test-harness.md).
harness/issues
Package issues posts develop's runs to GitHub: the develop-status issue, which holds develop's failing set and is open while an entry of it alerts, an issue for each test that fails 2 runs in a row, and a commit status for a run that doesn't run in a workflow, as the dedicated host's (docs/internals/rfcs/rfc-29-test-harness.md).
Package issues posts develop's runs to GitHub: the develop-status issue, which holds develop's failing set and is open while an entry of it alerts, an issue for each test that fails 2 runs in a row, and a commit status for a run that doesn't run in a workflow, as the dedicated host's (docs/internals/rfcs/rfc-29-test-harness.md).
harness/known
Package known reads a suite's known file, its known failures and expected skips, and grades a cell's results against it.
Package known reads a suite's known file, its known failures and expected skips, and grades a cell's results against it.
harness/needs
Package needs tells which of a suite's needs this machine meets (docs/internals/rfcs/rfc-29-test-harness.md).
Package needs tells which of a suite's needs this machine meets (docs/internals/rfcs/rfc-29-test-harness.md).
harness/plan
Package plan expands the registry into the cells a tier runs, each with the place it runs on (docs/internals/rfcs/rfc-29-test-harness.md).
Package plan expands the registry into the cells a tier runs, each with the place it runs on (docs/internals/rfcs/rfc-29-test-harness.md).
harness/registry
Package registry loads test/suites.yaml, the list of every test suite, and checks it as it loads.
Package registry loads test/suites.yaml, the list of every test suite, and checks it as it loads.
harness/report
Package report holds a dt run's results, cell by cell and test by test, and writes them as the run's summary.json, in the Common Test Report Format (CTRF) at one pinned version, with each cell's as a JUnit file and the run's report.md, both generated from the same results.
Package report holds a dt run's results, cell by cell and test by test, and writes them as the run's summary.json, in the Common Test Report Format (CTRF) at one pinned version, with each cell's as a JUnit file and the run's report.md, both generated from the same results.
harness/run
Package run runs the cells of a dt run: each test's commands under the test's and the cell's limits, with their output passed through and logged, and each test's results kept in the run's summary (docs/internals/rfcs/rfc-29-test-harness.md).
Package run runs the cells of a dt run: each test's commands under the test's and the cell's limits, with their output passed through and logged, and each test's results kept in the run's summary (docs/internals/rfcs/rfc-29-test-harness.md).
smbfuzz/cmd/smbfuzz command
Command smbfuzz is the differential SMB fuzzer DESIGN.md describes.
Command smbfuzz is the differential SMB fuzzer DESIGN.md describes.
smbfuzz/fixture
Package fixture brings up DESIGN.md §3's topology on this host: the AD-DC fixture's domain controller, a Samba member server as the reference, a DittoFS built from this checkout and joined to the domain, and the two kernel cifs mounts the fuzzer drives.
Package fixture brings up DESIGN.md §3's topology on this host: the AD-DC fixture's domain controller, a Samba member server as the reference, a DittoFS built from this checkout and joined to the domain, and the two kernel cifs mounts the fuzzer drives.
smbfuzz/fuzz
Package fuzz is the SMB differential fuzzer: plans, the generator, the per-user workers, the runner that executes a plan on the reference and the device under test in lockstep, the comparison and the minimiser.
Package fuzz is the SMB differential fuzzer: plans, the generator, the per-user workers, the runner that executes a plan on the reference and the device under test in lockstep, the comparison and the minimiser.
smbfuzz/sd
Package sd is the fuzzer's own codec for Windows security descriptors: the self-relative binary form a client sends and receives (MS-DTYP 2.4.6), and a text form, a subset of SDDL, that names trustees symbolically so a plan does not depend on the domain SID of one provisioning.
Package sd is the fuzzer's own codec for Windows security descriptors: the self-relative binary form a client sends and receives (MS-DTYP 2.4.6), and a text form, a subset of SDDL, that names trustees symbolically so a plan does not depend on the domain SID of one provisioning.
spec-citations command
Command spec-citations checks Open Specifications citations in Go source against a vendored section-number -> title map for each spec.
Command spec-citations checks Open Specifications citations in Go source against a vendored section-number -> title map for each spec.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL