From: Willem Jan Withagen Date: Thu, 6 Jul 2017 12:20:02 +0000 (+0200) Subject: filestore: Exclude BTRFS on FreeBSD X-Git-Tag: v12.1.1~163^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ac3e817385a1167568a3bd6754ee9eed254513c4;p=ceph.git filestore: Exclude BTRFS on FreeBSD Signed-off-by: Willem Jan Withagen --- diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 6891364562c..6eca6384edb 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -904,11 +904,14 @@ int FileStore::mkfs() goto close_fsid_fd; } +#if defined(__linux__) if (basefs.f_type == BTRFS_SUPER_MAGIC && !g_ceph_context->check_experimental_feature_enabled("btrfs")) { derr <<__FUNC__ << ": deprecated btrfs support is not enabled" << dendl; goto close_fsid_fd; } +#endif + create_backend(basefs.f_type); ret = backend->create_current(); @@ -1163,11 +1166,14 @@ int FileStore::_detect_fs() blk_size = st.f_bsize; +#if defined(__linux__) if (st.f_type == BTRFS_SUPER_MAGIC && !g_ceph_context->check_experimental_feature_enabled("btrfs")) { derr <<__FUNC__ << ": deprecated btrfs support is not enabled" << dendl; return -EPERM; } +#endif + create_backend(st.f_type); r = backend->detect_features();