Signed-off-by: Sage Weil <sage@redhat.com>
}
int BlueFS::_flush_and_sync_log(std::unique_lock<std::mutex>& l,
- uint64_t want_seq)
+ uint64_t want_seq,
+ uint64_t jump_to)
{
while (log_flushing) {
dout(10) << __func__ << " want_seq " << want_seq
int r = _flush(log_writer, true);
assert(r == 0);
+ if (jump_to) {
+ dout(10) << __func__ << " jumping log offset from 0x" << std::hex
+ << log_writer->pos << " -> 0x" << jump_to << std::dec << dendl;
+ log_writer->pos = jump_to;
+ log_writer->file->fnode.size = jump_to;
+ }
+
// drop lock while we wait for io
l.unlock();
wait_for_aio(log_writer);
int _fsync(FileWriter *h, std::unique_lock<std::mutex>& l);
int _flush_and_sync_log(std::unique_lock<std::mutex>& l,
- uint64_t want_seq = 0);
+ uint64_t want_seq = 0,
+ uint64_t jump_to = 0);
uint64_t _estimate_log_size();
bool _should_compact_log();
void _compact_log_sync();