xai-org/grok-build · error · anyhow::Error

cannot determine btrfs mount point for source {}

Error message

cannot determine btrfs mount point for source {}

What it means

Error "cannot determine btrfs mount point for source {}" thrown in xai-org/grok-build.

Source

Thrown at crates/codegen/xai-fast-worktree/src/btrfs/snapshot.rs:111

        .bind_mount_source
        .as_ref()
        .unwrap_or(&btrfs_info.subvolume_root);

    // When the source is directly on btrfs (no bind mount), the snapshot can be
    // created at `dest` itself — it is a real subvolume, not a kernel mount, so
    // it is namespace-independent and persistent. No symlink needed.
    if btrfs_info.bind_mount_source.is_none() {
        create_snapshot(snapshot_source, dest)?;
        return Ok(SnapshotResult {
            snapshot_path: dest.to_path_buf(),
            symlink_path: None,
        });
    }

    // Bind-mount source case: create the snapshot inside the btrfs mount, then
    // symlink `dest` to it.
    let btrfs_mount = btrfs_info.btrfs_mount_point.as_ref().ok_or_else(|| {
        anyhow::anyhow!(
            "cannot determine btrfs mount point for source {}",
            btrfs_info.subvolume_root.display()
        )
    })?;

    let snapshot_path = snapshot_dest_path(btrfs_mount, &btrfs_info.subvolume_root, dest);
    let worktrees_dir = snapshot_path.parent().unwrap_or(btrfs_mount);
    if !worktrees_dir.exists() {
        std::fs::create_dir_all(worktrees_dir).with_context(|| {
            format!(
                "failed to create worktrees directory at {}",
                worktrees_dir.display()
            )
        })?;
    }

    // A pre-existing entry here would be deleted with btrfs privileges, so guard it:
    // unlink a planted symlink, and only `btrfs delete` a real contained subvolume

View on GitHub (pinned to bc7f02eddd)

When it happens

Trigger: Thrown at crates/codegen/xai-fast-worktree/src/btrfs/snapshot.rs:111 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31). Data as JSON: /api/errors/f97fbb034bbce5b1. Report an issue: GitHub.