]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: detect XFS properly
authorGreg Farnum <greg@inktank.com>
Thu, 9 Jan 2014 22:03:12 +0000 (14:03 -0800)
committerGreg Farnum <greg@inktank.com>
Fri, 10 Jan 2014 03:15:36 +0000 (19:15 -0800)
We were only setting m_fs_type = FS_TYPE_XFS if
m_filestore_replica_fadvise was also set -- presumably
the bug fix accidentally blocked off too much of the code type. This
resulted in our xattr counts always being set too low: the store
is mounted (and thus does _detectfs) twice; once in as part of the
not-as-conditional-as-it-looks convertfs in ceph_osd.cc, and once
as part of OSD::init().

Reported-by: Sushma Gurram <Sushma.Gurram@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/os/FileStore.cc

index 22db6002db556c92f37d1e2bec3a54b20bac303b..564702cf351ec3b8b774b7e903dc4b8f9c3167b8 100644 (file)
@@ -850,12 +850,12 @@ int FileStore::_detect_fs()
     m_fs_type = FS_TYPE_BTRFS;
   } else if (st.f_type == XFS_SUPER_MAGIC) {
     dout(1) << "mount detected xfs" << dendl;
+    m_fs_type = FS_TYPE_XFS;
     if (m_filestore_replica_fadvise) {
       dout(1) << " disabling 'filestore replica fadvise' due to known issues with fadvise(DONTNEED) on xfs" << dendl;
       g_conf->set_val("filestore_replica_fadvise", "false");
       g_conf->apply_changes(NULL);
       assert(m_filestore_replica_fadvise == false);
-      m_fs_type = FS_TYPE_XFS;
     }
   }
 #endif