struct store_statfs_t store_statfs;
int r = statfs(&store_statfs);
- if(r >= 0) {
+ if (r >= 0) {
logger->set(l_bluestore_allocated, store_statfs.allocated);
logger->set(l_bluestore_stored, store_statfs.stored);
logger->set(l_bluestore_compressed, store_statfs.compressed);
comp_mode.load(),
[&]() {
string val;
- if(c->pool_opts.get(pool_opts_t::COMPRESSION_MODE, &val)) {
+ if (c->pool_opts.get(pool_opts_t::COMPRESSION_MODE, &val)) {
return boost::optional<Compressor::CompressionMode>(
Compressor::get_comp_mode_type(val));
}
comp_max_blob_size.load(),
[&]() {
int val;
- if(c->pool_opts.get(pool_opts_t::COMPRESSION_MAX_BLOB_SIZE, &val)) {
+ if (c->pool_opts.get(pool_opts_t::COMPRESSION_MAX_BLOB_SIZE, &val)) {
return boost::optional<uint64_t>((uint64_t)val);
}
return boost::optional<uint64_t>();
comp_min_blob_size.load(),
[&]() {
int val;
- if(c->pool_opts.get(pool_opts_t::COMPRESSION_MIN_BLOB_SIZE, &val)) {
+ if (c->pool_opts.get(pool_opts_t::COMPRESSION_MIN_BLOB_SIZE, &val)) {
return boost::optional<uint64_t>((uint64_t)val);
}
return boost::optional<uint64_t>();
logger = b.create_perf_counters();
g_ceph_context->get_perfcounters_collection()->add(logger);
bdev->queue_number++;
- if(bdev->queue_number.load() == 1)
+ if (bdev->queue_number.load() == 1)
reap_io = true;
}
start = ceph::coarse_real_clock::now();
}
- if(reap_io)
+ if (reap_io)
bdev->reap_ioc();
dout(20) << __func__ << " end" << dendl;
}
task->fill_cb();
task->release_segs(queue);
// read submitted by AIO
- if(!task->return_code) {
+ if (!task->return_code) {
if (ctx->priv) {
if (!--ctx->num_running) {
task->device->aio_callback(task->device->aio_callback_priv, ctx->priv);
assert(ioc->num_pending.load() == 0); // we should be only thread doing this
// Only need to push the first entry
ioc->nvme_task_first = ioc->nvme_task_last = nullptr;
- if(!queue_t)
+ if (!queue_t)
queue_t = new SharedDriverQueueData(this, driver);
queue_t->_aio_handle(t, ioc);
}
clear();
uint32_t _num_au = round_up_to(full_length, _au_size) / _au_size;
au_size = _au_size;
- if( _num_au > 1 ) {
+ if ( _num_au > 1 ) {
num_au = _num_au;
allocate();
}
assert(au_size);
if (!num_au) {
total_bytes += length;
- }else {
+ } else {
auto end = offset + length;
while (offset < end) {
uint32_t cur_offs = 0;
auto start_it = extents.begin();
size_t pos = 0;
- while(true) {
+ while (true) {
assert(start_it != extents.end());
if (cur_offs + start_it->length > b_off) {
break;