From: Sage Weil Date: Tue, 2 Nov 2010 18:10:38 +0000 (-0700) Subject: filestore: disable 'filestore btrfs snap' when SNAP_DESTROY is missing X-Git-Tag: v0.23~52 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=235aa1c31f14fc01cff5fcb615ab8ecce129addd;p=ceph.git filestore: disable 'filestore btrfs snap' when SNAP_DESTROY is missing 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 --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index caaf0055814a..ce541b1367c6 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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?