diff options
Diffstat (limited to 'src/os/bluestore/BlueFS.cc')
-rw-r--r-- | src/os/bluestore/BlueFS.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 3b30722b652..50f293d45fd 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -5,6 +5,7 @@ #include "bluestore_common.h" #include "BlueFS.h" +#include "common/Clock.h" // for ceph_clock_now() #include "common/debug.h" #include "common/errno.h" #include "common/perf_counters.h" @@ -12,6 +13,12 @@ #include "include/ceph_assert.h" #include "common/admin_socket.h" +#if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) +#include "crimson/common/perf_counters_collection.h" +#else +#include "common/perf_counters_collection.h" +#endif + #define dout_context cct #define dout_subsys ceph_subsys_bluefs #undef dout_prefix @@ -1699,7 +1706,8 @@ int BlueFS::_replay(bool noop, bool to_stdout) << " fnode=" << fnode << " delta=" << delta << dendl; - ceph_assert(delta.offset == fnode.allocated); + // be leanient, if there is no extents just produce error message + ceph_assert(delta.offset == fnode.allocated || delta.extents.empty()); } if (cct->_conf->bluefs_log_replay_check_allocations) { int r = _check_allocations(fnode, @@ -3823,6 +3831,7 @@ int BlueFS::truncate(FileWriter *h, uint64_t offset)/*_WF_L*/ if (changed_extents) { fnode.size = offset; fnode.reset_delta(); + fnode.recalc_allocated(); log.t.op_file_update(fnode); // sad, but is_dirty must be set to signal flushing of the log h->file->is_dirty = true; |