From: Gabriel BenHanokh Date: Wed, 20 Oct 2021 07:28:27 +0000 (+0300) Subject: changes to logging code requested by Adam X-Git-Tag: v17.1.0~575^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4bd159eef8235249b641de657d661ec57a703c87;p=ceph.git changes to logging code requested by Adam Signed-off-by: Gabriel Benhanokh --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 9ac7ec68d4449..71381aff4e05d 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -17526,7 +17526,7 @@ int BlueStore::restore_allocator(Allocator* dest_allocator, uint64_t *num, uint6 utime_t start = ceph_clock_now(); Allocator *temp_allocator = create_bitmap_allocator(bdev->get_size()); if (temp_allocator == nullptr) { - derr << "****failed create_bitmap_allocator()" << dendl; + derr << "Failed create_bitmap_allocator()" << dendl; return -1; } @@ -17541,7 +17541,7 @@ int BlueStore::restore_allocator(Allocator* dest_allocator, uint64_t *num, uint6 copy_allocator(temp_allocator, dest_allocator, &num_entries); delete temp_allocator; utime_t duration = ceph_clock_now() - start; - dout(5) << " <<>> in " << duration << " seconds, num_entries=" << num_entries << dendl; + dout(5) << "restored in " << duration << " seconds, num_entries=" << num_entries << dendl; return ret; } @@ -18287,7 +18287,11 @@ static int commit_freelist_type(KeyValueDB *db, const std::string& freelist_type bl.append(freelist_type); t->set(PREFIX_SUPER, "freelist_type", bl); - return db->submit_transaction_sync(t); + int ret = db->submit_transaction_sync(t); + if (ret != 0) { + derr << "Failed db->submit_transaction_sync(t)" << dendl; + } + return ret; } //------------------------------------------------------------------------------------- @@ -18318,11 +18322,16 @@ int BlueStore::commit_to_real_manager() if (ret == 0) { //remove the allocation_file invalidate_allocation_file_on_bluefs(); - dout(5) << "Remove Allocation File" << dendl; ret = bluefs->unlink(allocator_dir, allocator_file); bluefs->sync_metadata(false); - dout(1) << "Remove Allocation File ret_code=" << ret << dendl; + if (ret == 0) { + dout(5) << "Remove Allocation File successfully" << dendl; + } + else { + derr << "Remove Allocation File ret_code=" << ret << dendl; + } } + return ret; }