forked from kdave/btrfs-progs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs-progs: scrub: add the new -t option to set the limit at runtime
I know there is already `btrfs scrub limit` command to set the limit, but a lot of users are not aware of that command. Thus adding a new option `-t <throughput_limit>` to `btrfs scrub start`. This has some extra behavior compared to `btrfs scrub limit`: - Only set the value for the involved scrub device(s) If it's a full fs scrub, it will be the same as `btrfs scrub limit -a -l <value>`. If it's a single device, it will bt the same as `btrfs scrub limit -d <devid> -l <value>`. - Automatically reset the limit after scrub is finished - It only needs one single command line to set the limit Issue: kdave#943 Signed-off-by: Qu Wenruo <[email protected]> --- RFC: I'm not sure if this is really needed since we already have `btrfs scrub limit`. Involved tools like btrfs-maintenance scripts should have such support, but to my surprise, David introduced the `btrfs scrub limit` but not adding any support to btrfs-maintenance.
- Loading branch information
1 parent
e162294
commit af7ddf3
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters