patchmldonkey, a multi-networks file-sharing client - Patches: patch #4042, Avoid sharing temp dir

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #4042: Avoid sharing temp dir

Submitter:  spiralvoice <spiralvoice>
Submitted:  Wed 25 May 2005 10:42:25 AM UTC
   
 
Category:  Bug fixes Priority:  7 - High
Status:  Done Assigned to:  amorphous
Open/Closed:  Closed

Jump to the original submission

Sun 29 May 2005 11:39:08 PM UTC, comment #6: 

Applied to CVS 2005/05/30

spiralvoice <spiralvoice>
Group administrator
Sat 28 May 2005 11:53:59 AM UTC, comment #5: 

Patch updated

spiralvoice <spiralvoice>
Group administrator
Fri 27 May 2005 09:20:37 PM UTC, comment #4: 

"why not do this for every shared file and directory?"

If a file with the same md4 is already shared it won´t be shared twice:
donkeyGlobals.ml
lprintf "New Edonkey file with not changed different filename %s and %s\n"

To avoid sharing a directory twice which can still happen
(I am testing only incoming_files/directories and temp) we should
save the inode of a shared_dir. AFAICS we don´t keep a track of
shared subdirs (strategy all_files) so there would be some coding
necessary.

But regardless of that this patch (disabled on MinGW) should be
applied to avoid sharing temp. I met an user on IRC who had exactly
this problem and he was unable to use MLDonkey due to constant
rehashing of his temp files;-)

spiralvoice <spiralvoice>
Group administrator
Fri 27 May 2005 08:03:11 PM UTC, comment #3: 

I am testing the patch on MinGW now (did not do that before).
MLDonkey/MinGW shows all inodes = 0 so this patch does not work here.

from MinGW, stat.h:
struct _stat
{
_ino_t st_ino; /* Always zero ? */

Cygwin does it differently:
The inode number for a file is calculated by hashing its full Win32 path.

So we have to disable the patch on MinGW, although on Linux it works.

spiralvoice <spiralvoice>
Group administrator
Fri 27 May 2005 07:37:18 PM UTC, comment #2: 

I make a litle test with these patch

i moved my temp in my shared dir (./shared/temp) and startet 5 new Downloads.
No one of the current Downloading Files are shared, i had 0 Upload.
After 3 Files reach 100% nothing happens, no File is commited, no File are shared.
After restart the core the Files are shared now and the ready files  were commited.

Schlumpf <schlumpf_>
Group Member
Thu 26 May 2005 02:43:08 PM UTC, comment #1: 

why not do this for every shared file and directory?
Does it work on windows/mingw?

Amorphous <amorphous>
Wed 25 May 2005 10:42:25 AM UTC, original submission:  

Users can have temp_directory in a parent directory which is
shared recursive (strategy all_files). Due to this the files
in temp_directory where current download takes place are also
shared, and constantly hashed...
Also avoid sharing incoming_files and incoming_directories twice.

Comparing directories uses inodes so the patch also works with
weird entries like "../dir1/dir2/dir3/../../dir4" or linked dirs.
http://caml.inria.fr/pub/docs/manual-ocaml/libref/Unix.html#TYPEstats

spiralvoice <spiralvoice>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #8886:  4042_2.patch added by spiralvoice (2KiB - application/octet-stream - updated to disable patch on MinGW)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-07-07 spiralvoice StatusNone Done
    Open/ClosedOpen Closed
2005-06-22 spiralvoice Assigned toNone amorphous
2005-05-28 spiralvoice Attached File#4644 Removed
2005-05-28 spiralvoice Attached File- Added 4042_2.patch, #4655
2005-05-25 spiralvoice Attached File- Added recursive_share.patch, #4644

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code