LWN.net Logo

The Linux Storage and Filesystem Summit, day 1

The Linux Storage and Filesystem Summit, day 1

Posted Aug 9, 2010 12:43 UTC (Mon) by cesarb (subscriber, #6266)
In reply to: The Linux Storage and Filesystem Summit, day 1 by theraphim
Parent article: The 2010 Linux Storage and Filesystem Summit, day 1

> Is there any way I can monitor this?

Just stat() the destination?


(Log in to post comments)

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%).

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