Fix report_mount_progress never calling set_progress_header
commit778869fa139ab72ed557e7455e4f1126684f2625
authorAndriy Gapon <avg@FreeBSD.org>
Thu, 18 Feb 2021 21:53:05 +0000 (18 23:53 +0200)
committerGitHub <noreply@github.com>
Thu, 18 Feb 2021 21:53:05 +0000 (18 13:53 -0800)
treecee1ecd98097250e36578eddb65241f9328f9714
parentbf156c966bd68aef3b08716f9e81238a4571236a
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 <behlendorf1@llnl.gov>
Signed-off-by: Andriy Gapon <avg@FreeBSD.org>
Closes #11607
cmd/zfs/zfs_main.c