Skip to content

Commit

Permalink
os/bluestore/bluefs: Fix false collision with lockdep module
Browse files Browse the repository at this point in the history
Usually sequence of locking is 1) FileWriter 2) File.
In _compact_log_async_LD_NF_D it was in reversed order.
No real deadlock was possible, but lockdep complained.

Fixes: https://tracker.ceph.com/issues/52939
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
  • Loading branch information
aclamk committed Oct 19, 2021
1 parent 84d37ec commit 4b23ecf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/os/bluestore/BlueFS.cc
Expand Up @@ -2437,16 +2437,16 @@ void BlueFS::_compact_log_async_LD_NF_D() //also locks FW for new_writer
new_log_writer = _create_writer(new_log);

new_log_writer->append(bl);
new_log->lock.lock();
new_log_writer->lock.lock();
new_log->lock.lock();
// 3. flush
r = _flush_special(new_log_writer);
ceph_assert(r == 0);

// 4. wait
_flush_bdev(new_log_writer);
new_log_writer->lock.unlock();
new_log->lock.unlock();
new_log_writer->lock.unlock();
// 5. update our log fnode
// discard first old_log_jump_to extents

Expand Down

0 comments on commit 4b23ecf

Please sign in to comment.