diff options
author | Andriy Gapon <[email protected]> | 2021-02-18 23:53:05 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-03-05 12:49:22 -0800 |
commit | f6440fa0942fac8b62c96259059fa467fd1e0bcf (patch) | |
tree | 8b887d7b12212aa74ee8d9383094a16bd6f9eb43 | |
parent | 62f9691e10e5e73be32b8aa9e79964cebbb6c704 (diff) |
Fix report_mount_progress never calling set_progress_header
That happens because of an off-by-one mistake.
share_mount_one_cb() calls report_mount_progress(current=sm_done) after
having incremented sm_done by one. Then report_mount_progress()
increments the parameter again. It appears that that logic became
obsolete after commit a10d50f999511, parallel zfs mount.
On FreeBSD I observe that zfs mount -a -v prints, for example,
(null): (201/248)
That happens because set_progress_header() is never called.
With this change the output becomes correct:
Mounting ZFS filesystems: (209/248)
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Andriy Gapon <[email protected]>
Closes #11607
-rw-r--r-- | cmd/zfs/zfs_main.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 2dad91c08..b18e68fef 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -6790,9 +6790,6 @@ report_mount_progress(int current, int total) time_t now = time(NULL); char info[32]; - /* report 1..n instead of 0..n-1 */ - ++current; - /* display header if we're here for the first time */ if (current == 1) { set_progress_header(gettext("Mounting ZFS filesystems")); |