{"record":{"id":"f97fbb034bbce5b1","repo":"xai-org/grok-build","slug":"cannot-determine-btrfs-mount-point-for-source","errorCode":null,"errorMessage":"cannot determine btrfs mount point for source {}","messagePattern":"cannot determine btrfs mount point for source (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-fast-worktree/src/btrfs/snapshot.rs","lineNumber":111,"sourceCode":"        .bind_mount_source\n        .as_ref()\n        .unwrap_or(&btrfs_info.subvolume_root);\n\n    // When the source is directly on btrfs (no bind mount), the snapshot can be\n    // created at `dest` itself — it is a real subvolume, not a kernel mount, so\n    // it is namespace-independent and persistent. No symlink needed.\n    if btrfs_info.bind_mount_source.is_none() {\n        create_snapshot(snapshot_source, dest)?;\n        return Ok(SnapshotResult {\n            snapshot_path: dest.to_path_buf(),\n            symlink_path: None,\n        });\n    }\n\n    // Bind-mount source case: create the snapshot inside the btrfs mount, then\n    // symlink `dest` to it.\n    let btrfs_mount = btrfs_info.btrfs_mount_point.as_ref().ok_or_else(|| {\n        anyhow::anyhow!(\n            \"cannot determine btrfs mount point for source {}\",\n            btrfs_info.subvolume_root.display()\n        )\n    })?;\n\n    let snapshot_path = snapshot_dest_path(btrfs_mount, &btrfs_info.subvolume_root, dest);\n    let worktrees_dir = snapshot_path.parent().unwrap_or(btrfs_mount);\n    if !worktrees_dir.exists() {\n        std::fs::create_dir_all(worktrees_dir).with_context(|| {\n            format!(\n                \"failed to create worktrees directory at {}\",\n                worktrees_dir.display()\n            )\n        })?;\n    }\n\n    // A pre-existing entry here would be deleted with btrfs privileges, so guard it:\n    // unlink a planted symlink, and only `btrfs delete` a real contained subvolume","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-fast-worktree/src/btrfs/snapshot.rs#L93-L129","documentation":"Error \"cannot determine btrfs mount point for source {}\" thrown in xai-org/grok-build.","triggerScenarios":"Thrown at crates/codegen/xai-fast-worktree/src/btrfs/snapshot.rs:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}