From a431c527dc92cd4ada35957692f6a9f23a840b1d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 16 Mar 2010 10:53:45 -0700 Subject: [PATCH] filestore: fix CLONE_RANGE detection --- src/os/FileStore.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 2aa37e2d841d9..33c4ca0da02b9 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -425,11 +425,12 @@ int FileStore::_detect_fs() btrfs = true; // clone_range? + btrfs_clone_range = true; int r = _do_clone_range(fsid_fd, -1, 0, 1); if (r == -EBADF) { dout(0) << "mount btrfs CLONE_RANGE ioctl is supported" << dendl; - btrfs_clone_range = true; } else { + btrfs_clone_range = false; dout(0) << "mount btrfs CLONE_RANGE ioctl is NOT supported: " << strerror_r(-r, buf, sizeof(buf)) << dendl; } } else { -- 2.39.5