#502 FPSyncDir patch correction

v0.69x
closed
Volker
5
2012-10-28
2009-01-29
adisor19
No

Hi,

A Linux dev found a problem in the FPSyncDir patch you added back in September to netatalk. Apparently, the function never calls "closedir()" and could lead to problems.

The netatalk devs have committed the change to netatalk 2.0.4 unreleased version this past December. You can see the details here :

http://sourceforge.net/mailarchive/message.php?msg_name=f107df20812211359u6cf6fc6aub951204fafd2a922%40mail.gmail.com

Regards,

Adi

Reference to your patch from September :

"Revision 3794 - Directory Listing
Modified Tue Sep 9 21:41:09 2008 UTC (4 months, 2 weeks ago) by votdev

Add AFP3.2 (FPSyncDir) support to netatalk. Code has been taken from http://marc.info/?l=netatalk-devel&m=121084448214854&w=2"

Discussion

  • Dan Merschi

    Dan Merschi - 2009-01-30

    From: https://sourceforge.net/mailarchive/message.php?msg_name=1A2387A3-9CDC-472B-8993-1698FAF36865%40gmail.com

    "One of the things to note that in Linux fsync() does not guarantee
    that the data is written to disk. A decent summary is at:

    http://lwn.net/Articles/270891/

    It is easy to say that fsync() on Linux is broken (and I agree), but
    the problem is that for Linux netatalk says it honours FPSyncDir, but
    then doesn't actually guarantee a write to disk. This seems dangerous
    to me, users tend to be unhappy when they lose data, especially when
    they are using a backup solution."

    AFAIK This bug apply to Linux, not FreeBSD.

     
  • adisor19

    adisor19 - 2009-01-30

    Hi danmero,

    I don't think this is related to the Linux fsync() function at all. It's a simple logic mistake in the original FPSyncDir patch that was proposed to netatalk and later added to FreeNAS. That particualr fucntion initially calls the opendir() function but never calls the closedir() upon completition thust leaving the the directory in an open and potentially locked state. I don't see how it's related to fsync() on Linux... IMO

    Adi

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks