Package: testdisk
Version: 7.0-3+b3
Severity: normal
Tags: upstream

I started testdisk on a 465 GiB volume, then had to interrupt it when
it was only 130 GiB through -- it was predicting at least another
hour.

I restarted the session later, and after the restart, it (incorrectly)
predicts only a few minutes.  

I don't see a bug reporting venue upstream other than a webforum
(which i'd rather not register for and can't track easily) so i'm
reporting this in the debian BTS and trying to forward it upstream as
well.

Here's why i suspect this is happening:

Using these variables of time and position:

   T_start = Time of start of current run
   T_now = Current time
   P_max = Size of the volume
   P_cur = Current position of the scan in the volume
   P_start = Initial position of the current run

The estimated time should probably be calculated by:

   (T_start - T_now)
   -----------------  × (P_max - P_cur)
   (P_cur - P_start)


But instead it looks like it is calculated by:

   (T_start - T_now)
   -----------------  × (P_max - P_cur)
         P_cur

These are identical when the current run starts at the beginning of
the volume (i.e. P_start == 0), but it is clearly wrong when P_start
is greater than zero.

   --dkg

-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (500, 'oldstable'), 
(200, 'unstable-debug'), (200, 'unstable'), (1, 'experimental-debug'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.17.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages testdisk depends on:
ii  libc6            2.27-5
ii  libcom-err2      1.44.3-1
ii  libext2fs2       1.44.3-1
ii  libjpeg62-turbo  1:1.5.2-2+b1
ii  libncursesw6     6.1+20180714-1
ii  libntfs-3g88     1:2017.3.23-2
ii  libtinfo6        6.1+20180714-1
ii  libuuid1         2.32.1-0.1
ii  ntfs-3g          1:2017.3.23-2
ii  zlib1g           1:1.2.11.dfsg-1

testdisk recommends no packages.

testdisk suggests no packages.

-- no debconf information

Reply via email to