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;
}
copy_allocator(temp_allocator, dest_allocator, &num_entries);
delete temp_allocator;
utime_t duration = ceph_clock_now() - start;
- dout(5) << " <<<FINISH>>> in " << duration << " seconds, num_entries=" << num_entries << dendl;
+ dout(5) << "restored in " << duration << " seconds, num_entries=" << num_entries << dendl;
return ret;
}
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;
}
//-------------------------------------------------------------------------------------
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;
}