mldonkey-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-users] [patch #4770] Change file opening mechanism, open rw on


From: spiralvoice
Subject: [Mldonkey-users] [patch #4770] Change file opening mechanism, open rw only when needed
Date: Sat, 7 Jan 2006 15:48:11 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.8) Gecko/20051223 Firefox/1.5

URL:
  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4770>

                 Summary: Change file opening mechanism, open rw only when
needed
                 Project: mldonkey, a multi-networks file-sharing client
            Submitted by: spiralvoice
            Submitted on: Sa 07.01.2006 um 15:48
                Category: Bug fixes
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open

    _______________________________________________________

Details:

This patch by Pango is experimental!

Base for this slightly updated (only logging stuff) patch:
http://ftp.berlios.de/pub/mldonkey/pango/file_mode_cleanup_v6-WIP.patch

http://ftp.berlios.de/pub/mldonkey/pango/file_mode_cleanup.txt
           file mode cleanup patch, not for faint of heart

MLDonkey currently opens all files (shared and downloads) in rw + creat
mode, only falling back to ro if opening fails.

Opening shared files rw is not only a bit unsafe, but it can also lead
to problems (exclusive file access under Windows ?). creat flag is the
reason for other bugs, like 0 byte files sometimes appearing when
shard files are moved around.

The idea is then to "tighten" MLDonkey behavior, to open shared files
ro, downloads rw, and to use the creat flag only when a new file may
be created (new download started,...)

This requires huge changes that affect all network supports, and may
generate unhandled exceptions that can prevent some features from
working. The different network supports must be tested. To help
debugging, Unix32 module should log the exceptions it generates.

Opening files with separate ro and rw descriptors can generate data
corruption when used with buffered_writes feature. Current patch tries
to provide data consistency this by flushing the rw descriptor when
some read is requested on either descriptor, but it will need heavy
testing.

The expected benefits (possibility to open shared files under
Windows,...) must be tested too. Maybe some specific open mode must be
used, if default mode is exclusive.






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sa 07.01.2006 um 15:48  Name: file_mode_cleanup_v7-WIP.patch  Size:
91,01KB   By: spiralvoice

<http://savannah.nongnu.org/patch/download.php?item_id=4770&item_file_id=5720>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4770>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]