On Wed, Jan 06, 2021 at 02:31:46PM +0200, Andrei POPESCU wrote:
> Package: e2fsprogs
> Version: 1.44.5-1+deb10u3
> Severity: normal
> Tags: upstream
> 
> According to the man page the -p option should print out "percentage 
> completion bars", though this was not done on a recent operation 
> (offline shrink).

If the resize operation doesn't require anything complex --- for
example, merely adjusting the number of blocks in the superblock,
without needing to relocate any blocks or inodes, we end up not doing
anything time-consuming enough to trigger a progress bar.

I suppose we could add a pointless progress bar which shows up for a
few milliseconds, but it would be a "even if you don't blink, you
still might miss it".  For example:

% mke2fs -Fq -t ext4 foo.img 16384
% e2fsck -fy foo.img
e2fsck 1.45.6 (20-Mar-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
foo.img: 11/4096 files (0.0% non-contiguous), 1813/16384 blocks
% time resize2fs -p foo.img 16380
resize2fs 1.45.6 (20-Mar-2020)
Resizing the filesystem on foo.img to 16380 (1k) blocks.
The filesystem on foo.img is now 16380 (1k) blocks long.


real    0m0.003s
user    0m0.002s
sys     0m0.000s


Probably the best thing to do is to change the man page to say that
progress bars will be displayed for non-trivial resize operations, or
some such.

Cheers,

                                        - Ted

Reply via email to