Review Request: kio-file: sync file copy to /media/

David Faure faure at kde.org
Fri Jan 22 20:35:54 GMT 2010



> On 2010-01-22 19:56:42, David Faure wrote:
> > I think the idea makes sense, but hardcoding /media is not portable at all, it wouldn't even work on my system where I mount usb keys to subdirs of /mnt. Using KMountPoint might be a better idea, although I'm not sure how it can find out that the device is removable. Well, Solid knows, right?
> 
> Davide Bettio wrote:
>     I decided to use an hardcoded path (even if it's a bad practice) because I wanted to reduce the number of dbus calls and any other kind of overhead.
>     Moreover this patch has been meant to cover only 96% of users and I wanted to be sure to not use O_SYNC on nfs (because it seems to be a bad idea) and I'm pretty sure of that because usually no one mount it in /media.
>     It might be a good idea to enable users to configure it at compile time.

That sounds like fixing a bug without fixing it, sorry.

KMountPoint parses /etc/mtab and keeps a cache, no dbus involved. Solid might have a cache too, not sure.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2690/#review3794
-----------------------------------------------------------


On 2010-01-22 20:31:01, Davide Bettio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2690/
> -----------------------------------------------------------
> 
> (Updated 2010-01-22 20:31:01)
> 
> 
> Review request for kdelibs and David Faure.
> 
> 
> Summary
> -------
> 
> This simple patch allows file copy to external devices to be synchronous. This patch assumes that external devices are mounted on a subdirectory of /media/. If /media/ is not used this patch will not work so everything will be as before.
> For more dettails see also https://bugs.kde.org/show_bug.cgi?id=195044.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kioslave/file/file_unix.cpp 1077183 
> 
> Diff: http://reviewboard.kde.org/r/2690/diff
> 
> 
> Testing
> -------
> 
> This patch is recent, so I'm testing it right now. kio-file is a critical component so I will do more tests.
> 
> Checking for file corruption might be a good idea:
> dd if=/dev/full of=testFile count=numOfBlocks
> md5sum testFile
> Copy it, umount, mount and check the md5sum.
> 
> 
> Thanks,
> 
> Davide
> 
>





More information about the kde-core-devel mailing list