Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcachefs format device specific options are inherited by later devices #226

Open
freswa opened this issue Jan 28, 2024 · 1 comment
Open

Comments

@freswa
Copy link

freswa commented Jan 28, 2024

bcachefs format --label hdd.hdd0 /dev/mapper/hdd0 --label=ssd.ssd0 --discard --durability=2 /dev/mapper/ssd0

Gives me hdd0 with durability 1 and discard disabled.

bcachefs format --label=ssd.ssd0 --discard --durability=2 /dev/mapper/ssd0 --label hdd.hdd0 /dev/mapper/hdd0

Gives me hdd0 with durability 2 and discard enabled.

If intentional, we need to document this behavior.

@daurnimator
Copy link

Looks like dev_opts is not completely reset in

dev_opts.size = 0;

I think it should be replaced with

    dev_opts = dev_opts_default();

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

No branches or pull requests

2 participants