[Pkg-mc-devel] Bug#592941: mc: interrupted move causes duplicated files

Adam Borowski kilobyte at angband.pl
Sat Aug 14 10:43:32 UTC 2010

Package: mc
Version: 3:
Severity: normal

When moving a directory to a different filesystem (ie, copy+delete), MC
postpones deletion until after all copying is done.  However, if there is
some interruption, most likely due to target fs running out of space, MC
will fail to do pending deletions of already completed files.

This causes duplicated files, and is especially painful when information
about what has been moved and what not is important.  All that MC offers is
restarting the move from the very start, which is not a good idea for large
transfers over slow links.

Also, while such postponed deletion does improve performance for small and
medium moves, it seriously degrades it when the tree is big enough to not
fit in the VFS cache.

Thus, a change I'd suggest is:
* don't postpone more than, say, 1000 deletions
* on an interruption, delete the pending completed files before aborting
(the former may seem tangential, but in a tree that takes 10 minutes to
delete, you don't want to block for long before displaying the error message)

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (150, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.35-trunk-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mc depends on:
ii  libc6                         2.11.2-2   Embedded GNU C Library: Shared lib
ii  libglib2.0-0                  2.24.1-1   The GLib library of C routines
ii  libgpm2                       1.20.4-3.3 General Purpose Mouse - shared lib
ii  libslang2                     2.2.2-4    The S-Lang programming library - r

Versions of packages mc recommends:
ii  mime-support                  3.48-1     MIME files 'mime.types' & 'mailcap

Versions of packages mc suggests:
pn  arj                        <none>        (no description available)
ii  bzip2                      1.0.5-4       high-quality block-sorting file co
pn  catdvi                     <none>        (no description available)
pn  dbview                     <none>        (no description available)
pn  djvulibre-bin              <none>        (no description available)
ii  evince [pdf-viewer]        2.30.3-1      Document (postscript, pdf) viewer
ii  file                       5.04-5        Determines file type using "magic"
pn  gv                         <none>        (no description available)
ii  imagemagick                8: image manipulation programs
pn  links | w3m | lynx         <none>        (no description available)
pn  odt2txt                    <none>        (no description available)
ii  perl                       5.10.1-14     Larry Wall's Practical Extraction 
ii  python                     2.6.5-13      interactive high-level object-orie
pn  python-boto                <none>        (no description available)
pn  python-tz                  <none>        (no description available)
ii  unzip                      6.0-4         De-archiver for .zip files
pn  zip                        <none>        (no description available)

-- no debconf information

More information about the Pkg-mc-devel mailing list