]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
XfsFileStoreBackend: default to disabling extsize on xfs 2103/head
authorSamuel Just <sam.just@inktank.com>
Mon, 14 Jul 2014 20:29:37 +0000 (13:29 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 14 Jul 2014 21:55:38 +0000 (14:55 -0700)
This appears to be responsible for the deep scrub mismatches on some rbd
workloads.

Fixes: 8830
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/common/config_opts.h
src/os/XfsFileStoreBackend.cc

index 1c9dbacc71d0bf97bb812fef6679717b931ff8e1..bc2395b154e4dd03301ac685856297bca70db04f 100644 (file)
@@ -651,6 +651,12 @@ OPTION(filestore_btrfs_clone_range, OPT_BOOL, true)
 OPTION(filestore_zfs_snap, OPT_BOOL, false) // zfsonlinux is still unstable
 OPTION(filestore_fsync_flushes_journal_data, OPT_BOOL, false)
 OPTION(filestore_fiemap, OPT_BOOL, false)     // (try to) use fiemap
+
+// (try to) use extsize for alloc hint
+// WARNING: extsize seems to trigger data corruption in xfs -- that is why it is
+// off by default, see bug #8830
+OPTION(filestore_xfs_extsize, OPT_BOOL, false)
+
 OPTION(filestore_journal_parallel, OPT_BOOL, false)
 OPTION(filestore_journal_writeahead, OPT_BOOL, false)
 OPTION(filestore_journal_trailing, OPT_BOOL, false)
index 80721e334aca11af88807d5e191ffd6d950c1c35..bff9402dacb999500b45803bce638044f0acb8aa 100644 (file)
@@ -103,15 +103,20 @@ int XfsFileStoreBackend::detect_features()
     goto out_close;
   }
 
-  ret = set_extsize(fd, 1U << 15); // a few pages
-  if (ret) {
-    ret = 0;
-    dout(0) << "detect_feature: failed to set test file extsize, assuming extsize is NOT supported" << dendl;
-    goto out_close;
+  if (g_conf->filestore_xfs_extsize) {
+    ret = set_extsize(fd, 1U << 15); // a few pages
+    if (ret) {
+      ret = 0;
+      dout(0) << "detect_feature: failed to set test file extsize, assuming extsize is NOT supported" << dendl;
+      goto out_close;
+    } else {
+      dout(0) << "detect_feature: extsize is supported" << dendl;
+      m_has_extsize = true;
+    }
+  } else {
+    dout(0) << "detect_feature: extsize is disabled by conf" << dendl;
   }
 
-  dout(0) << "detect_feature: extsize is supported" << dendl;
-  m_has_extsize = true;
 
 out_close:
   TEMP_FAILURE_RETRY(::close(fd));