summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-11 07:05:15 -0800
committerSage Weil <sage@inktank.com>2013-02-11 07:05:15 -0800
commit1bb14254952fc851634d5151e085f16ad8f301d6 (patch)
treeefebe348ac32d0e059d336ef03273d6be5bc66c1
parent778c45cd263ba10b7a25c7759cf6cbf651b5f862 (diff)
downloadceph-1bb14254952fc851634d5151e085f16ad8f301d6.tar.gz
hack to see what clone from journal might look likewip-sim-journal-clone
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.
-rw-r--r--src/os/FileStore.cc10
1 files changed, 9 insertions, 1 deletions
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();