]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: disable 'filestore btrfs snap' when SNAP_DESTROY is missing
authorSage Weil <sage@newdream.net>
Tue, 2 Nov 2010 18:10:38 +0000 (11:10 -0700)
committerSage Weil <sage@newdream.net>
Tue, 2 Nov 2010 18:10:38 +0000 (11:10 -0700)
We want to enable the new snap stuff by default.  But we also want to work
with the default configuration on old kernels.

The only downside here is that someone might explicitly enable it, only to
have it disabled on started because their kernel is old.  They'll get a
bright yellow warning in that case, at least.

Signed-off-by: Sage Weil <sage@newdream.net>
src/os/FileStore.cc

index caaf0055814a987441db66e0781e4efebd5a1551..ce541b1367c69faf4cd52ef2ce034a659a666245 100644 (file)
@@ -752,12 +752,12 @@ int FileStore::_detect_fs()
 
     if (g_conf.filestore_btrfs_snap && !btrfs_snap_destroy) {
       dout(0) << "mount btrfs snaps enabled, but no SNAP_DESTROY ioctl (from kernel 2.6.32+)" << dendl;
-      cerr << TEXT_RED
-          << " ** ERROR: 'filestore btrfs snap' is enabled (for safe transactions, rollback),\n"
-          << "           but btrfs does not support the SNAP_DESTROY ioctl (added in\n"
-          << "           Linux 2.6.32).\n"
+      cerr << TEXT_YELLOW
+          << " ** WARNING: 'filestore btrfs snap' was enabled (for safe transactions, rollback),\n"
+          << "             but btrfs does not support the SNAP_DESTROY ioctl (added in\n"
+          << "             Linux 2.6.32).  Disabling.\n"
           << TEXT_NORMAL;
-      return -ENOTTY;
+      g_conf.filestore_btrfs_snap = false;
     }
 
     // start_sync?