[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdecore/io
From:       David Faure <faure () kde ! org>
Date:       2010-11-06 2:23:19
Message-ID: 20101106022319.09FBAAC89B () svn ! kde ! org
[Download RAW message or body]

SVN commit 1193442 by dfaure:

Actually, if we are clever about defaulting to fam on nfs, we can default to qfswatch \
everywhere except linux where inotify works slightly better. rakuco said ok for \
qfswatch on bsd too (to benefit from kqueue support; with the patches from MR2425). \
Looks all clean now :)


 M  +6 -12     kdirwatch.cpp  


--- trunk/KDE/kdelibs/kdecore/io/kdirwatch.cpp #1193441:1193442
@@ -83,11 +83,6 @@
   return dwp_self;
 }
 
-// Should we default to QFSWatch?
-// Pro: supports kqueue on BSD (pending MR 2425), supports symbian etc.
-// Con: does not support FAM, i.e. breaks with NFS mounts on linux where it only \
                uses inotify
-//  -> nfsPreferredMethod could default to fam [fallbacks to stat], actually...
-
 // Convert a string into a watch Method
 static KDirWatch::Method methodFromString(const QString& method) {
   if (method == QLatin1String("Fam")) {
@@ -97,12 +92,11 @@
   } else if (method == QLatin1String("QFSWatch")) {
     return KDirWatch::QFSWatch;
   } else {
-#ifdef Q_OS_WIN
-    return KDirWatch::QFSWatch;
-#elif defined(Q_OS_FREEBSD)
-    return KDirWatch::Stat;
-#else
+#ifdef Q_OS_LINUX
+    // inotify supports delete+recreate+modify, which QFSWatch doesn't support
     return KDirWatch::INotify;
+#else
+    return KDirWatch::QFSWatch;
 #endif
   }
 }
@@ -112,7 +106,7 @@
 {
     switch (method) {
     case KDirWatch::FAM:
-        return "FAM";
+        return "Fam";
     case KDirWatch::INotify:
         return "INotify";
     case KDirWatch::DNotify:
@@ -175,7 +169,7 @@
   m_preferredMethod = methodFromString(method);
 
   // The nfs method defaults to the normal (local) method
-  m_nfsPreferredMethod = methodFromString(config.readEntry("nfsPreferredMethod", \
method)); +  m_nfsPreferredMethod = \
methodFromString(config.readEntry("nfsPreferredMethod", "Fam"));  
   QList<QByteArray> availableMethods;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic