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>
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?