diff options
author | Sage Weil <sage@inktank.com> | 2013-02-11 07:05:15 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-11 07:05:15 -0800 |
commit | 1bb14254952fc851634d5151e085f16ad8f301d6 (patch) | |
tree | efebe348ac32d0e059d336ef03273d6be5bc66c1 /src/os/FileStore.cc | |
parent | 778c45cd263ba10b7a25c7759cf6cbf651b5f862 (diff) | |
download | ceph-wip-sim-journal-clone.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.
Diffstat (limited to 'src/os/FileStore.cc')
-rw-r--r-- | src/os/FileStore.cc | 10 |
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(); |