]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: fix CLONE_RANGE detection
authorSage Weil <sage@newdream.net>
Tue, 16 Mar 2010 17:53:45 +0000 (10:53 -0700)
committerSage Weil <sage@newdream.net>
Tue, 16 Mar 2010 22:51:01 +0000 (15:51 -0700)
src/os/FileStore.cc

index 2aa37e2d841d9708a793d5650e58282319bfd2ed..33c4ca0da02b94d5a52adc625645af37e013b5b5 100644 (file)
@@ -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 {