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

Enhanced progress indicator #69

Closed
wants to merge 2 commits into from
Closed

Enhanced progress indicator #69

wants to merge 2 commits into from

Conversation

@speed47
Copy link

speed47 commented Oct 1, 2017

I've been forking btrfs-progs locally in 2015 to add an enhanced progress indicator, as the current ".oOo."-style progress indicator is not really helpful to see the check progression for a multi-Tb filesystem. I posted about it on the ML and it was added in the integration branch at some point, but was forgotten there (including by me) before being merged.

I rebased it against current master, and reworked it a bit to make it better than the 2015 version. The ".oOo." progress indicator is replaced with a count of the walked items (depending on the "thing" being inspected, this way if the walks stops or there's an infinite loop somewhere, you'll notice), adds an elapsed time indicator, and a step counter (currently 7).

As code paths differ, it has been tested in normal and lowmem mode, and on FS with and without qgroups. It has also been tested under valgrind.

The first commit is a single-line fix on the task_period_start function I stumbled upon while creating this patch.

Here's how the output looks like on a 22 Tb 5-disk RAID1 FS:

# btrfs check -p /dev/mapper/luks-ST10000VN0004-XXXXXXXX
Opening filesystem to check...
Checking filesystem on /dev/mapper/luks-ST10000VN0004-XXXXXXXX
UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
[1/7] checking extents           (0:20:21 elapsed, 950958 items checked)
[2/7] checking root items        (0:01:29 elapsed, 15121 items checked)
[3/7] checking free space cache  (0:00:11 elapsed, 4928 items checked)
[4/7] checking fs roots          (0:51:31 elapsed, 600892 items checked)
[5/7] checking csums             (0:14:35 elapsed, 754522 items checked)
[6/7] checking root refs         (0:00:00 elapsed, 232 items checked)
[7/7] checking quota groups skipped (not enabled on this FS)
found 5286458060800 bytes used, no error found

Any comments about the patch are welcome (code-related or on the progress output itself).
If needed or wanted, I can also send it to the ML.

@speed47 speed47 force-pushed the speed47:progress branch 3 times, most recently from ec0cf44 to 60bea17 Oct 1, 2017
@kdave kdave added the new label Oct 10, 2017
@speed47 speed47 force-pushed the speed47:progress branch 2 times, most recently from f87a211 to ccc8fbf Feb 9, 2018
@speed47
Copy link
Author

speed47 commented Feb 10, 2018

Rebased the patch against latest master to fix conflicts.

I also made a 20 seconds terminal recording of what it looks like, the FS is a test one of only 8 Gb, so the btrfs check is of course pretty fast, and that's not for such tiny FS that the progress indicator is really useful, but it still gives a rough idea of the output : https://asciinema.org/a/YkpaGGIih3WSe0mWtnt4qVACd

@speed47 speed47 changed the title Progress Enhanced progress indicator Feb 10, 2018
@Damenly
Copy link
Contributor

Damenly commented Jul 4, 2018

Hi, @speed47 your patches look nice to me.

Since cmds-check.c was split into files under btrfs-progs/check/, could you rebase them to master again and send them to ML. So we can have some reviews.
Thanks!

speed47 added 2 commits Oct 1, 2017
Signed-off-by: Stéphane Lesimple <stephane_btrfs@lesimple.fr>
Signed-off-by: Stéphane Lesimple <stephane_btrfs@lesimple.fr>
@speed47 speed47 force-pushed the speed47:progress branch from ccc8fbf to e009765 Jul 4, 2018
@speed47
Copy link
Author

speed47 commented Jul 4, 2018

Rebased the patch against current master.
I'll post to the ML shortly!

@kdave kdave added enhancement review:ok test:ok and removed new labels Jul 16, 2018
@kdave
Copy link
Owner

kdave commented Jul 16, 2018

Merged to devel, thanks.

@kdave kdave closed this Jul 16, 2018
@speed47 speed47 deleted the speed47:progress branch Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.