Skip to content

Show error when attempting to create bcachefs subvolume in place of dir#1238

Draft
zebreus wants to merge 1 commit intonix-community:masterfrom
zebreus:bcachefs-fail-on-existing-dir
Draft

Show error when attempting to create bcachefs subvolume in place of dir#1238
zebreus wants to merge 1 commit intonix-community:masterfrom
zebreus:bcachefs-fail-on-existing-dir

Conversation

@zebreus
Copy link
Copy Markdown

@zebreus zebreus commented Mar 22, 2026

The bcachefs module currently silently skips subvolume creation if there is already a directory present at the given path. As far as I can tell disko most likely never hits that condition, but if it does should most likely fail/print the error. The bcachefs tools already fail and print an error when attempting to create a subvolume in a place where there is already a directory, so the additional check in disko can just be removed.

Copilot AI review requested due to automatic review settings March 22, 2026 11:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts bcachefs subvolume creation behavior so that disko no longer silently skips creating a subvolume when a directory already exists at the target path, instead letting bcachefs subvolume create surface the error.

Changes:

  • Removed the “is it a directory?” guard when probing whether a target path is already a subvolume.
  • Always attempts bcachefs subvolume create after ensuring the parent directory exists, allowing bcachefs-tools to error out when appropriate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zebreus zebreus marked this pull request as draft March 22, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants