jarun / advcpmv

A patch for GNU Core Utilities cp, mv to add progress bars
765 stars 72 forks source link

Add 9.0 patch #9

Closed Zackptg5 closed 3 years ago

Zackptg5 commented 3 years ago

Resubmitted, will automatically disable reflink if progress bar is used

jarun commented 3 years ago

Thank you!

ghost commented 3 years ago

@Zackptg5 Just to clarify, does reflink still work if one invokes advcp without -g?

Zackptg5 commented 3 years ago

@whalehub ya, I only auto disable reflink if the progress bar option is specified

ghost commented 3 years ago

@Zackptg5 Thanks for the clarification!

jarun commented 3 years ago

@Zackptg5 can you please document this in readme?

harriott commented 2 years ago

(no Issues tab so reporting here, as Jarun advised) 1) Arch linux: I only get progress bar when using cpg -g, mvg -g only ever shows size calculations. 2) If source filename contains a single quote, mvg -g succeeds, but the progress calculation fails completely.

jarun commented 2 years ago

@Zackptg5 ~in do_move(), why are we not calculating du for each file?~

jarun commented 2 years ago

Ignore the question. The comment on latest is wrong.

harriott commented 2 years ago

mvg -g has somehow been slightly improved in that a progress bar is now shown, but always at 100% (ie not really showing the progress)...

SlrG commented 2 years ago

This is a "problem" of the newer coreutils versions. They introduced usage of the "copy_file_range" system call. If available on a system it is used instead of the internal method used before.

For this in-kernel copy process its only possible to update the progress bar, whenever it finishes copying a file. Thus the per file copy bar is always full and only the global progress bar shows the progress.

In the end this new method causes a huge loss of information and there is probably no chance to bring it back.

Falling back to the internal copy mechanism whenever the progress parameter is used, might not be the best idea, as the new method wasn't introduced without reasons.

An alternative to the always full file progress bar, could be to disable it, whenever the new copy mechanism is used.