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

nixos/btrfs: make autoScrub not prevent shutdown or suspend #80141

Merged
merged 1 commit into from Mar 12, 2020

Conversation

symphorien
Copy link
Member

Fixes: #79086 #79017

can you test this @schmittlauch ?

Things done

Tested on my system, only that scrub is cancelled by suspend.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@schmittlauch
Copy link
Member

I backported this onto the release-19.09 branch, there it works fine both with shutdown and suspend.

It would be nice if the scrubbing was resumed/ started again after resuming from suspension. But if this was not trivial to achieve, I'd be in favour of merging this without resumption support. Maybe we can still sneak this into 20.03, @worldofpeace? It'd be a shame if this small bugfix only reached stable in September.

@schmittlauch
Copy link
Member

bump @symphorien:

Do you see a straight-forward way for resumption or do you prefer to merge this as-is for the time being?

@symphorien
Copy link
Member Author

man btrfs scrub mentions no cancel or resume operation. So I think there is no straightforward way to improve. Let's merge as is.

@Ekleog Ekleog merged commit 26b1ef1 into NixOS:master Mar 12, 2020
@Ekleog
Copy link
Member

Ekleog commented Mar 12, 2020

Merged and backported to 20.03 as 99a3d7a, seeing the absence of opposition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

services.btrfs.autoScrub: running scrub prevents system suspend
3 participants