LWN.net Logo

The Linux Storage and Filesystem Summit, day 1

The Linux Storage and Filesystem Summit, day 1

Posted Aug 9, 2010 12:16 UTC (Mon) by theraphim (subscriber, #25955)
Parent article: The 2010 Linux Storage and Filesystem Summit, day 1

> Progress bars neither justify nor require the creation of asynchronous interfaces.

LOL.
Seriously.
How one is supposed to figure out the state of the operation?
Let's say I'm trying to copy 500gig in a single file, somewhere on the network.
Is there any way I can monitor this? Am I making any progress during the past 1.5 hours of silence, or I was cut off the net for past hour?

Progress bars can be useful, and they are not always "bars".


(Log in to post comments)

The Linux Storage and Filesystem Summit, day 1

Posted Aug 9, 2010 12:43 UTC (Mon) by cesarb (subscriber, #6266) [Link]

> Is there any way I can monitor this?

Just stat() the destination?

The Linux Storage and Filesystem Summit, day 1

Posted Aug 9, 2010 13:58 UTC (Mon) by theraphim (subscriber, #25955) [Link]

There are different ways in which copy can be implemented. Especially if it's a copy handled by some remote filesystem.
Not all of them stat-friendly.
The similarly wrong approach would be to use "df" to see if space is being eaten.

The Linux Storage and Filesystem Summit, day 1

Posted Aug 9, 2010 14:46 UTC (Mon) by rvfh (subscriber, #31018) [Link]

Maybe duplicate the file descriptor and monitor the offset?

The Linux Storage and Filesystem Summit, day 1

Posted Aug 9, 2010 21:24 UTC (Mon) by theraphim (subscriber, #25955) [Link]

Here you assume you are doing linear copy in a single copying thread. There are cases in which this assumption is untrue, for example, when copying large file from one storage cluster to another you may want to copy chunks in parallel between the chunk servers.

The Linux Storage and Filesystem Summit, day 1

Posted Aug 9, 2010 14:46 UTC (Mon) by sync (guest, #39669) [Link]

A good copy would preallocate the destination file. stat() wouldn't work with this (always 100%).

The Linux Storage and Filesystem Summit, day 1

Posted Aug 10, 2010 5:16 UTC (Tue) by lkundrak (subscriber, #43452) [Link]

How do you monitor progress of, say, fsync()? I mean, how many system calls were designed with progress monitoring in mind?

I'm wondering why a call with less than file granularity was not considered (at least I am not aware of). If you could pick smaller units (multiplies of filesystem blocks?) to clone, you could probably also find more interesting uses apart from being able to reasonably control/monitor progress.

The Linux Storage and Filesystem Summit, day 1

Posted Aug 19, 2010 13:18 UTC (Thu) by renox (subscriber, #23785) [Link]

If I understood well, this 'copy' is a 'virtual copy' ie a kind of hardlink with COW semantic so this should be a fast operation so in this case you don't really need a progress bar.
For a real copy, the issue is there though.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds