From 1bb14254952fc851634d5151e085f16ad8f301d6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 11 Feb 2013 07:05:15 -0800 Subject: hack to see what clone from journal might look like this is an upper bound, since we aren't touching the extent trees, and that isn't completely free in btrfs.. but it shouldn't be too far off. --- src/os/FileStore.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 44f3b571960..8a5bad74927 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -2891,7 +2891,15 @@ int FileStore::_write(coll_t cid, const hobject_t& oid, } // write - r = bl.write_fd(fd); + if (bl.length() > 65536) { + // hack to see what clone-from-journal perf might look like + bufferlist f; + f.append("blah"); + ::lseek64(fd, offset + bl.length() - f.length(), SEEK_SET); + f.write_fd(fd); + } else { + r = bl.write_fd(fd); + } if (r == 0) r = bl.length(); -- cgit v1.2.1