]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: don't try trimming kernel dcache on DARWIN/FreeBSD
authorYan, Zheng <zyan@redhat.com>
Sun, 5 Jul 2015 08:02:33 +0000 (16:02 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 31 Aug 2015 08:00:22 +0000 (16:00 +0800)
still don't know if the methods used on linux also works on
DARWIN/FreeBSD

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/ceph_fuse.cc
src/client/fuse_ll.cc

index 4dde41772ff76ad602f46cd3d6357f4f8cbeca63..9fd8d0e950a27761e73c9ce8ca0646e7a776cd7b 100644 (file)
@@ -122,6 +122,7 @@ int main(int argc, const char **argv, const char *envp[]) {
       }
       virtual ~RemountTest() {}
       virtual void *entry() {
+#if defined(__linux__)
        int ver = get_linux_version();
        assert(ver != 0);
        bool can_invalidate_dentries = g_conf->client_try_dentry_invalidate &&
@@ -151,6 +152,9 @@ int main(int argc, const char **argv, const char *envp[]) {
          }
        }
        return reinterpret_cast<void*>(tr);
+#else
+       return reinterpret_cast<void*>(0);
+#endif
       }
     } tester;
 
index 551984b23be4bc2a992f9a4932856a72981efb0d..410509d7c8f8444d92442d1f34dcb7109560417d 100644 (file)
@@ -978,7 +978,9 @@ int CephFuse::Handle::start()
     ino_cb: client->cct->_conf->fuse_use_invalidate_cb ? ino_invalidate_cb : NULL,
     dentry_cb: dentry_invalidate_cb,
     switch_intr_cb: switch_interrupt_cb,
+#if defined(__linux__)
     remount_cb: remount_cb,
+#endif
     /*
      * this is broken:
      *