id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
2310	When moving mc queues delete operations and performs them only if copy is completed sucesfully	zaytsev		"Forwarded from Debian: http://bugs.debian.org/592941

{{{
From: Adam Borowski <kilobyte@angband.pl>
Subject: mc: interrupted move causes duplicated files
Date: Sat, 14 Aug 2010 12:43:32 +0200

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)


}}}
"	enhancement	new	minor	Future Releases	mc-core	4.7.0.8			kilobyte@… zaytsev			no branch	
