Skip to content

Commit 63f0a0d

Browse files
author
Pere Diaz Bou
committed
os/bluestore: fix _extend_log seq advance
when extending the log, the sequence was left on a bad state because it would first create a transaction to update with the current seq number but leave the "real" transaction with the same sequence number which should be `extend_log_transaction.seq + 1`. Signed-off-by: Pere Diaz Bou <[email protected]>
1 parent 8c68a50 commit 63f0a0d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/os/bluestore/BlueFS.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3120,12 +3120,13 @@ void BlueFS::_extend_log(uint64_t amount) {
31203120
_pad_bl(bl, super.block_size);
31213121
log.writer->append(bl);
31223122
ceph_assert(allocated_before_extension >= log.writer->get_effective_write_pos());
3123-
log.t.seq = log.seq_live;
31243123

31253124
// before sync_core we advance the seq
31263125
{
31273126
std::unique_lock<ceph::mutex> l(dirty.lock);
3128-
_log_advance_seq();
3127+
dirty.seq_live++;
3128+
log.seq_live++;
3129+
log.t.seq++;
31293130
}
31303131
}
31313132

0 commit comments

Comments
 (0)