os/bluestore: do not update used_blocks with bluefs_extents if bluefs is
not available
When I disabled bluefs, the bluefs point is nullptr, but is still used.
It caused the problem:
*** Caught signal (Segmentation fault) **
in thread
7f733db01d80 thread_name:ceph-osd
ceph version
16.0.0-4201-g2ccd47711b (
2ccd47711b73b09069e6964730532fc3cf6e7382) pacific (dev)
1: (()+0x153c0) [0x7f733e1a73c0]
2: (pthread_mutex_lock()+0x4) [0x7f733e19dfc4]
3: (BlueFS::get_block_extents(unsigned int, interval_set<unsigned long, std::map>*)+0x40) [0x562384a57680]
4: (BlueStore::_fsck_on_open(BlueStore::FSCKDepth, bool)+0x743) [0x5623849b1143]
5: (BlueStore::_fsck(BlueStore::FSCKDepth, bool)+0x32a) [0x5623849be1da]
6: (BlueStore::mkfs()+0xc77) [0x5623849c0967]
7: (OSD::mkfs(ceph::common::CephContext*, ObjectStore*, uuid_d, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)+0x1b2) [0x5623843e85c2]
8: (main()+0x1563) [0x56238436b3f3]
9: (__libc_start_main()+0xf3) [0x7f733dc0e0b3]
10: (_start()+0x2e) [0x5623843b734e]
2020-08-10T00:54:09.896+0000
7f733db01d80 -1 *** Caught signal (Segmentation fault) **
in thread
7f733db01d80 thread_name:ceph-osd
ceph version
16.0.0-4201-g2ccd47711b (
2ccd47711b73b09069e6964730532fc3cf6e7382) pacific (dev)
Signed-off-by: Feng Hualong <hualong.feng@intel.com>