The Comprehensive Ceph Guide
فارسیGet started
Appendix G

List of Algorithms

14 min read

This appendix lists all 188 “Algorithm” boxes of the book in chapter order. Each box comes with an explanation, pseudocode, complexity, a worked numeric example and at least one figure. The “Source” column names the file and function the algorithm was extracted from and checked against. The page column links to the box itself.

#AlgorithmSource in codeChapterPage
1Probability of losing a PG when three OSDs fail at the same timeExact computation on the CRUSH mapping with osdmaptool; default mon_target_pg_per_osd = 200 from src/common/options/mgr.yaml.in1
2Time to restore redundancy, bottlenecked by the busiest targetMapping before and after osdmaptool --mark-out 0; real limits: osd_max_backfills, the mClock profile (chapter 21) and the network1
3Building an image id and the names of its objects (format 2)src/librbd/Utils.cc :: generate_image_id; src/include/rbd_types.h (prefixes); src/cls/rbd/cls_rbd.cc :: dir_add_image2
4Pruning a discard and choosing its operationsrc/librbd/io/ImageRequest.cc :: ImageDiscardRequest::prune_object_extents; src/librbd/io/ObjectRequest.h :: ObjectDiscardRequest; src/librbd/ImageCtx.cc (skip_partial_discard)2
5Counting the space used in rbd dusrc/tools/rbd/action/DiskUsage.cc :: get_image_disk_usage (diff_iterate2 with whole_object = !exact); src/librbd/api/DiffIterate.cc2
6Mapping an image range to RADOS objects (striping)src/osdc/Striper.cc :: Striper::file_to_extents; src/librbd/ImageCtx.cc :: ImageCtx::init_layout3
7Size and states of the object mapsrc/include/rbd/object_map_types.h; src/librbd/ObjectMap.cc :: ObjectMap::is_compatible; src/cls/rbd/cls_rbd_types.h :: MAX_OBJECT_MAP_OBJECT_COUNT; src/librbd/io/ObjectRequest.cc :: AbstractObjectWriteRequest; src/librbd/object_map/SnapshotCreateRequest.cc :: update_object_map3
8Computing a diff from object mapssrc/librbd/object_map/DiffRequest.cc :: DiffRequest::handle_load_object_map3
9The TokenBucketThrottle token bucket for rbd_qos_*src/common/Throttle.cc :: TokenBucketThrottle::set_limit, tokens_this_tick, add_tokens, Bucket::put, Bucket::get; src/librbd/io/QosImageDispatch.cc3
10Mapping an object key to a bucket index shardsrc/rgw/services/svc_bi_rados.h :: RGWSI_BucketIndex_RADOS::bucket_shard_index; src/rgw/driver/rados/rgw_tools.h :: rgw_shards_mod; src/common/ceph_hash.cc :: ceph_str_hash_linux4
11Computing the preferred number of shardssrc/rgw/driver/rados/rgw_reshard.cc :: RGWBucketReshard::calculate_preferred_shards, nearest_prime4
12Number of entries requested from each shard in an ordered ListObjectssrc/rgw/driver/rados/rgw_rados.cc :: RGWRados::calc_ordered_bucket_list_per_shard, cls_bucket_list_ordered4
13The layout of an S3 object in RADOSsrc/rgw/rgw_obj_manifest.cc :: RGWObjManifest::get_implicit_location; src/rgw/driver/rados/rgw_putobj_processor.cc :: AtomicObjectProcessor::prepare; src/rgw/driver/rados/rgw_obj_manifest.cc :: RGWObjManifest::generator::create_begin4
14Choosing the datalog shard for a bucket shardsrc/rgw/driver/rados/rgw_datalog.cc :: RGWDataChangesLog::choose_oid5
15Adding a datalog entry with the window and renewsrc/rgw/driver/rados/rgw_datalog.cc :: RGWDataChangesLog::add_entry, renew_entries, renew_run5
16Choosing the mdlog shard for a metadata changesrc/rgw/driver/rados/rgw_sal_rados.cc (hash_key = section + ":" + key); src/rgw/driver/rados/rgw_metadata.cc :: rgw_shard_name, RGWMetadataLog::add_entry5
17Trimming the datalog based on the lowest stable markersrc/rgw/driver/rados/rgw_trim_datalog.cc :: DataLogTrimCR, take_min_markers, get_stable_marker5
18Mapping a file byte to a RADOS object in the data poolsrc/osdc/Striper.cc :: Striper::file_to_extents; src/include/object.cc :: file_object_t::c_str; src/mds/InoTable.cc :: InoTable::reset_state6
19Choosing the dirfrag for a dentrysrc/mds/CInode.cc :: InodeStoreBase::hash_dentry_name, pick_dirfrag; src/include/frag.h :: fragtree_t::operator[]; src/include/ceph_frag.h6
20The split and merge decision for a dirfragsrc/mds/MDBalancer.cc :: MDBalancer::hit_dir, maybe_fragment, queue_split; src/mds/CDir.cc :: CDir::should_split, should_split_fast, should_merge6
21DecayCounter and the "hot" thresholdsrc/common/DecayCounter.cc :: DecayCounter::decay; src/common/DecayCounter.h :: DecayRate6
22The MON's decision to mark an OSD downsrc/mon/OSDMonitor.cc :: OSDMonitor::check_failure, get_grace_time, is_failure_stale7
23Updating laggy_probability and laggy_intervalsrc/mon/OSDMonitor.cc :: OSDMonitor::prepare_boot, grace_interval_threshold_exceeded, set_default_laggy_params7
24Automatic marking outsrc/mon/OSDMonitor.cc :: OSDMonitor::tick (down_pending_out), can_mark_out; src/osd/OSDMap.cc :: containing_subtree_is_down7
25Estimating a pool's usable spacesrc/mon/PGMap.cc :: PGMap::get_rule_avail, dump_object_stat_sum; src/osd/OSDMap.cc :: pool_raw_used_rate7
26Counting movement by comparing two mappingsosdmaptool --test-map-pgs-dump before and after the change; bucket_straw2_choose and crush_choose_firstn in src/crush/mapper.c8
27Classifying movements after a reweightcrushtool --reweight-item (also updates the parents' weights); the same A and B comparison8
28Password validation in the Dashboardsrc/pybind/mgr/dashboard/services/access_control.py :: PasswordPolicy.check_all, check_password_complexity, check_if_sequential_characters, check_if_repetitive_characters; src/pybind/mgr/dashboard/settings.py :: PWD_POLICY_*9
29Checking scope and permission for each endpointsrc/pybind/mgr/dashboard/services/auth/auth.py :: AuthManagerTool._check_authorization, JwtManager.gen_token, JwtManager.get_user; src/pybind/mgr/dashboard/services/access_control.py :: User.authorize, Role.authorize; src/pybind/mgr/dashboard/controllers/_rest_controller.py :: _permission_map9
30Counting failed login attempts and disablingsrc/pybind/mgr/dashboard/controllers/auth.py :: Auth.create; src/pybind/mgr/dashboard/services/access_control.py :: AccessControlDB.increment_attempt, reset_attempt, get_attempt9
31Measuring stats stalenessmeasurement; mgr_stats_period in src/common/options/mgr.yaml.in9
32The cost of each query in terms of PG countmeasurement; mgr_command('pg dump') and mon_command('status')9
33Validating osd bench parameterssrc/osd/OSD.cc :: OSDBenchTest::precheck, OSDBenchTest::run_test (v21.2.0 and main); in v20.2.0 the same logic is in OSD::run_osd_bench_test10
34The boot test and storing osd_mclock_max_capacity_iopssrc/osd/OSD.cc :: OSD::maybe_override_max_osd_capacity_for_qos10
35Turning an mClock profile into byte reservations and limitssrc/common/mclock_common.cc :: MclockConfig::set_from_config, ClientRegistry::update_from_profile, MclockConfig::calc_scaled_cost; src/common/mclock_common.h :: HIGH_CLIENT_OPS, BALANCED, HIGH_RECOVERY_OPS (v21.2.0)10
36The closed loop of rados bench and Little's lawrados bench (src/common/obj_bencher.cc); L = X · R10
37Placing daemons on hostssrc/pybind/mgr/cephadm/schedule.py :: HostAssignment.place, get_candidates11
38The DB/WAL slot size on the fast devicesrc/ceph-volume/ceph_volume/devices/lvm/batch.py :: Batch.fast_allocations, get_physical_fast_allocs11
39The upgrade order in cephadmsrc/pybind/mgr/cephadm/utils.py :: CEPH_UPGRADE_ORDER; src/pybind/mgr/cephadm/upgrade.py :: CephadmUpgrade._do_upgrade, _to_upgrade11
40Maximising the ok-to-stop setsrc/mgr/DaemonServer.cc :: DaemonServer::_maximize_ok_to_stop_set, _check_offlines_pgs11
41Accepting or rejecting a compressed blobsrc/os/bluestore/BlueStore.cc :: BlueStore::_do_alloc_write (want_len, result_len)12
42The space allocated for an objectsrc/os/bluestore/BlueStore.cc (min_alloc_size recorded in the superblock at mkfs); defaults bluestore_min_alloc_size_{hdd,ssd} = 4K in main12
43Target level sizes with the default optionssrc/common/options/global.yaml.in :: bluestore_rocksdb_options (max_bytes_for_level_base = 1 GiB, max_bytes_for_level_multiplier = 8)12
44Reed-Solomon with a Vandermonde matrix in ISA (technique=reed_sol_van)src/erasure-code/isa/ErasureCodeIsa.cc :: ErasureCodeIsaDefault::prepare, isa_encode, isa_decode; ISA-L ec_base.c :: gf_gen_rs_matrix13
45Checking whether the Vandermonde matrix is MDSsrc/erasure-code/isa/ErasureCodeIsa.cc :: ErasureCodeIsaDefault::parse (m > 4, or m = 4 and k > 21 ← cauchy)13
46Parity-delta writes in FastECsrc/erasure-code/isa/ErasureCodeIsa.cc :: encode_delta, apply_delta (ec_encode_data_update); src/osd/ECTransaction.cc (do_parity_delta_write)13
47The read volume for rebuilding one chunksrc/erasure-code/clay/ErasureCodeClay.cc :: parse (q = d − k + 1, t = (k+m+nu)/q, sub_chunk_no = qᵗ); src/erasure-code/lrc13
48Budget calculation and the dual throttlesrc/osdc/Objecter.cc :: Objecter::calc_op_budget, _throttle_op; src/common/Throttle.h :: Throttle::_should_wait14
49Throughput cap of one Objecter instancesrc/osdc/Objecter.cc :: _throttle_op (with the defaults of objecter_inflight_ops and objecter_inflight_op_bytes)14
50Linger pings and watch expiry in the OSDsrc/osdc/Objecter.cc :: Objecter::tick, _send_linger_ping; src/osd/PrimaryLogPG.cc (CEPH_OSD_WATCH_OP_WATCH); src/osd/Watch.cc14
51Determining the effective notify timeoutsrc/librados/IoCtxImpl.cc :: IoCtxImpl::notify, aio_notify; src/osd/PrimaryLogPG.cc (CEPH_OSD_OP_NOTIFY)14
52Checking the RD/WR flags before and after running a class methodsrc/osd/osd_op_util.cc :: OpInfo::set_from_op (the CEPH_OSD_OP_CALL branch); src/osd/ClassHandler.cc :: ClassHandler::open_class, _get_class, in_class_list; src/osd/PrimaryLogPG.cc :: PrimaryLogPG::do_osd_ops15
53Acquiring, renewing and expiring a lock in cls_locksrc/cls/lock/cls_lock.cc :: lock_obj, read_lock; src/cls/lock/cls_lock_types.h :: LOCK_FLAG_MAY_RENEW, LOCK_FLAG_MUST_RENEW15
54Paging in cls_cxx_map_get_valssrc/osd/objclass.cc :: cls_cxx_map_get_vals; src/osd/PrimaryLogPG.cc :: do_osd_ops (CEPH_OSD_OP_OMAPGETVALS)15
55Atomic increment with a class methodsrc/cls/numops/cls_numops.cc :: add (cls_cxx_map_get_val, then cls_cxx_map_set_val); serialization by the PG lock in PrimaryLogPG15
56The break-even point of processing next to the datameasurement; clslua_read, clslua_stat and eval_json in src/cls/lua/cls_lua.cc15
57Size of the Bloom filter in a HitSetsrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::hit_set_create; src/osd/BloomHitSet.h :: BloomHitSet16
58The grade table and object temperaturesrc/osd/osd_types.h :: pg_pool_t::calc_grade_table, get_grade; src/osd/PrimaryLogPG.cc :: agent_estimate_temp, agent_maybe_evict; src/common/histogram.h :: pow2_hist_t::get_position_micro16
59Computing evict_effortsrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::agent_choose_mode16
60Mapping a bucket to a lifecycle shard, and the workers' traversalsrc/rgw/rgw_lc.cc :: get_lc_index, get_bucket_lc_key, random_sequence, RGWLC::process; src/common/ceph_hash.cc :: ceph_str_hash_linux16
61Computing expiry with rounding to midnightsrc/rgw/rgw_lc.cc :: obj_has_expired; src/include/utime.h :: utime_t::round_to_day16
62Extra DB capacity in use_some_extrasrc/os/bluestore/BlueFS.h :: RocksDBBlueFSVolumeSelector (constructor, get_extra_level, get_hint_by_dir); src/os/bluestore/BlueStore.cc :: BlueStore::_open_bluefs (building the vselector)16
63Choosing the authoritative info in peeringsrc/osd/PeeringState.cc :: PeeringState::calculate_maxles_and_minlua, PeeringState::find_best_info17
64Counting and reporting slow operations with exponential back-offsrc/common/TrackedOp.cc :: OpTracker::with_slow_ops_in_flight, OpTracker::check_ops_in_flight, visit_ops_in_flight17
65Randomizing the time of shallow and deep scrubssrc/osd/scrubber/scrub_job.cc :: ScrubJob::adjust_shallow_schedule, ScrubJob::adjust_deep_schedule, ScrubJob::guaranteed_offset; src/osd/scrubber/pg_scrubber.cc :: PgScrubber::populate_config_params17
66Counting PG states during an eventceph pg dump pgs_brief (PGMap in the mgr); the state string from pg_state_string in src/osd/osd_types.cc17
67The effect of losing k hosts before the OSDs are marked outup mapping from osdmaptool --test-map-pgs-dump; the min_size criterion in PeeringState (chapter 17)17
68Updating the connection score in ConnectionTrackersrc/mon/ConnectionTracker.cc :: report_live_connection, report_dead_connection, get_total_connection_score; src/mon/Elector.cc :: ping_check, dead_ping18
69Comparing proposals in ElectionLogicsrc/mon/ElectionLogic.cc :: connectivity_election_score, propose_connectivity_handler18
70SimplePolicy: mapping and moving imagessrc/tools/rbd_mirror/image_map/SimplePolicy.cc :: calc_images_per_instance, do_shuffle_add_instances, do_map; src/tools/rbd_mirror/image_map/Policy.cc :: can_shuffle_image; src/tools/rbd_mirror/ImageMap.cc :: schedule_rebalance_task18
71Three-pass pg_autoscaler (up to v20.2.0)src/pybind/mgr/pg_autoscaler/module.py :: PgAutoscaler._calc_final_pg_target, nearest_power_of_two (tag v20.2.0)19
72Optimal PG rounding with dynamic programmingsrc/pybind/mgr/pg_autoscaler/module.py :: PgAutoscaler._find_optimal_pg_distribution, _calculate_final_pool_pg_target, get_dynamic_threshold, PoolGroup.update (tag v21.2.0)19
73Weighted deviation and bal_score in calc_pg_upmapssrc/osd/OSDMap.cc :: OSDMap::calc_pg_upmaps, calc_deviations, fill_overfull_underfull19
74The balancer's path in upmap modesrc/osd/OSDMap.cc :: calc_pg_upmaps; src/pybind/mgr/balancer/module.py; the same code in osdmaptool --upmap19
75The pg_num and pgp_num controller in the mgrsrc/mgr/DaemonServer.cc :: adjust_pgs; the options target_max_misplaced_ratio = 0.05 (global.yaml.in) and mgr_max_pg_num_change = 128 (mgr.yaml.in)19
76Mapping a value to a bucket in PerfHistogramsrc/common/perf_histogram.cc :: PerfHistogramCommon::get_bucket_for_axis, get_axis_bucket_ranges; src/osd/osd_perf_counters.cc :: op_hist_x_axis_config, op_hist_y_axis_config20
77Metric cache and the stale policysrc/pybind/mgr/prometheus/module.py :: MetricCollectionThread.collect, Module.config_notify, Root.metrics20
78Detecting flapping with rate on a gaugemonitoring/ceph-mixin/prometheus_alerts.yml :: CephOSDFlapping20
79Deviation of each OSD's PG count from the device class averagemonitoring/ceph-mixin/prometheus_alerts.yml :: CephPGImbalance20
80Predicting pool fill-up with linear regressionmonitoring/ceph-mixin/prometheus_alerts.yml :: CephPoolGrowthWarning; Prometheus :: predict_linear20
81Choosing the OSDShard for a requestsrc/osd/OSD.cc :: OSD::ShardedOpWQ::_enqueue, OSD::get_num_op_shards; src/osd/osd_types.h :: spg_t::hash_to_shard21
82Automatic tuning of osd_memory_targetsrc/pybind/mgr/cephadm/autotune.py :: MemoryAutotuner.tune; src/pybind/mgr/cephadm/serve.py :: CephadmServe._autotune_host_memory21
83Splitting a write and the deferred decision in the classic pathsrc/os/bluestore/BlueStore.cc :: BlueStore::_do_write_data, _do_write_big, _do_alloc_write21
84Tagging and selecting requests in dmClocksrc/dmclock/src/dmclock_server.h :: RequestTag::RequestTag, tag_calc, PriorityQueueBase::do_next_request, reduce_reservation_tags; src/osd/scheduler/mClockScheduler.h21
85Extracting each stage's time from dump_historic_opsTrackedOp::mark_event and OpRequest::mark_flag_point (src/common/TrackedOp.cc, src/osd/OpRequest.h); ReplicatedBackend::submit_transaction and do_repop_reply22
86libaio batch submission with exponential backoffsrc/blk/aio/aio.cc :: aio_queue_t::submit_batch23
87io_uring submission and reaping with two locks and epollsrc/blk/kernel/io_uring.cc :: ioring_queue_t::submit_batch, ioring_queue, ioring_get_cqe, get_next_completed23
88Exponential growth of append spacesrc/common/buffer.cc :: buffer::list::append(const char*, unsigned), refill_append_space23
89crc32c of zeros with jump matricessrc/common/crc32c.cc :: ceph_crc32c_zeros, create_turbo_table (the crc_turbo_table[32][32] table)23
90Adjusting a cached crc to a new seedsrc/common/buffer.cc :: buffer::list::crc32c; include/buffer_raw.h :: raw::get_crc, set_crc23
91Choosing a range in AvlAllocatorsrc/os/bluestore/AvlAllocator.cc :: AvlAllocator::_allocate, _pick_block_after, _pick_block_fits24
92Computing fragmentation_ratingsrc/os/bluestore/Allocator.cc :: Allocator::get_fragmentation_score24
93AVL memory cap and moving ranges to bitmapsrc/os/bluestore/AvlAllocator.h :: AvlAllocator::_try_insert_range; src/os/bluestore/HybridAllocator_impl.h :: HybridAllocatorBase::allocate, _spillover_range24
94Decoding and verifying the labelbluestore_bdev_label_t::encode/decode in src/os/bluestore/bluestore_types.cc; _write_bdev_label with bl.crc32c(-1) in BlueStore.cc24
95Insert and search in a skiplistrocksdb/memtable/inlineskiplist.h :: InlineSkipList::RandomHeight, FindGreaterOrEqual, Insert25
96Forming a write grouprocksdb/db/write_thread.cc :: WriteThread::JoinBatchGroup, EnterAsBatchGroupLeader, ExitAsBatchGroupLeader25
97Splitting a WAL record into 32K blocksrocksdb/db/log_writer.cc :: log::Writer::AddRecord, EmitPhysicalRecord; db/log_format.h25
98Key delta encoding and Seek within a blockrocksdb/table/block_based/block_builder.cc :: BlockBuilder::AddWithLastKeyImpl, Finish; table/block_based/block.cc :: DataBlockIter::SeekImpl (BinarySeek); util/coding.h :: EncodeVarint3225
99Cache-line-local Bloomrocksdb/util/bloom_impl.h :: FastLocalBloomImpl::ChooseNumProbes, AddHash, HashMayMatchPrepared; BloomMath::CacheLocalFpRate25
100Computing level targets and the compaction scorerocksdb/db/version_set.cc :: VersionStorageInfo::CalculateBaseBytes, ComputeCompactionScore, MaxInputLevel25
101On-wire length of an msgr2.1 framesrc/msg/async/frames_v2.h :: FrameAssembler::get_preamble_onwire_len, get_segment_onwire_len, get_epilogue_onwire_len, get_frame_onwire_len26
102Nonce management in AES-128-GCMsrc/msg/async/crypto_onwire.cc :: rxtx_t::create_handler_pair, AES128GCM_OnWireTxHandler::reset_tx_handler, AES128GCM_OnWireRxHandler::reset_rx_handler26
103The Worker event loopsrc/msg/async/Event.cc :: EventCenter::process_events, dispatch_event_external, wakeup; src/msg/async/Stack.cc :: NetworkStack::add_thread26
104Distributing connections across Workerssrc/msg/async/Stack.cc :: NetworkStack::get_worker; Stack.h :: Worker::release_worker; AsyncConnection.cc :: AsyncConnection::_stop26
105Resending and discarding messages after a reconnectsrc/msg/async/ProtocolV2.cc :: ProtocolV2::requeue_sent, discard_requeued_up_to, handle_reconnect_ok26
106Multiplication with log/exp tablesisa-l/erasure_code/ec_base.c :: gf_mul, gf_inv27
107Vector multiplication with a nibble table (split-table)isa-l/erasure_code/ec_base.c :: gf_vect_mul_init_base, ec_init_tables_base and the assembly versions gf_*vect_dot_prod_avx2.asm27
108Generating the ISA-L encoding matrixisa-l/erasure_code/ec_base.c :: gf_gen_rs_matrix, gf_gen_cauchy1_matrix; src/erasure-code/isa/ErasureCodeIsa.cc :: ErasureCodeIsaDefault::parse, prepare27
109decode with Gauss-Jordan elimination in GF(2⁸)isa-l/erasure_code/ec_base.c :: gf_invert_matrix; src/erasure-code/isa/ErasureCodeIsa.cc :: ErasureCodeIsaDefault::isa_decode27
110Parity update with a deltasrc/erasure-code/isa/ErasureCodeIsa.cc :: ErasureCodeIsaDefault::encode_delta, apply_delta; isa-l :: ec_encode_data_update27
111Generating mapping and layers in LRCsrc/erasure-code/lrc/ErasureCodeLrc.cc :: ErasureCodeLrc::parse_kml27
112Choosing the repair sub-chunks in Claysrc/erasure-code/clay/ErasureCodeClay.cc :: ErasureCodeClay::parse, get_repair_subchunks, get_repair_sub_chunk_count27
113Choosing in a uniform bucket with an incremental permutationsrc/crush/mapper.c :: bucket_perm_choose, bucket_uniform_choose28
114Choosing in a list bucketsrc/crush/mapper.c :: bucket_list_choose28
115Choosing in a tree bucketsrc/crush/mapper.c :: bucket_tree_choose; src/crush/builder.c :: crush_make_tree_bucket28
116Greedy upmap selection with a score testsrc/osd/OSDMap.cc :: OSDMap::calc_pg_upmaps, calc_deviations, fill_overfull_underfull, try_pg_upmap, find_best_remap28
117Multi-step descent with retry (MSR)src/crush/mapper.c :: crush_msr_do_rule, crush_msr_choose, crush_msr_descend, crush_msr_get_retry_value28
118Splitting and merging extents in the stripernet/ceph/striper.c :: ceph_file_to_extents, ceph_calc_file_object_mapping, lookup_last29
119calc_target and the resend decisionnet/ceph/osd_client.c :: calc_target, target_should_be_paused, ceph_osds_changed; net/ceph/osdmap.c :: ceph_pg_is_split29
120handle_timeout and handle_osds_timeoutnet/ceph/osd_client.c :: handle_timeout, handle_osds_timeout, send_linger_ping; include/linux/ceph/libceph.h (defaults)29
121Acquiring the exclusive lock and pushing aside a dead ownerdrivers/block/rbd.c :: rbd_acquire_lock, rbd_try_acquire_lock, rbd_try_lock, find_watcher, rbd_request_lock29
122Encoding and displaying capsfs/ceph/caps.c :: ceph_cap_string, gcap_string; include/linux/ceph/ceph_fs.h (CEPH_CAP_S*, CEPH_CAP_G*)29
123Cooperative scheduling in the Seastar reactorseastar: reactor::run (used in src/crimson/osd/main.cc and the crimson_reactor_* options)30
124Choosing the least-loaded core for a new PGsrc/crimson/osd/pg_map.cc :: PGShardMapping::get_or_create_pg_mapping30
125Batching records in RecordSubmittersrc/crimson/os/seastore/journal/record_submitter.cc :: RecordSubmitter::submit / flush_current_batch30
126Choosing a segment to reclaim (greedy / cost-benefit / benefit)src/crimson/os/seastore/async_cleaner.cc :: SegmentCleaner::calc_gc_benefit_cost, get_next_reclaim_segment30
127Detecting completion with the Phase Tag (walking the CQ)linux: drivers/nvme/host/pci.c :: nvme_poll_cq, nvme_cqe_pending, nvme_update_cq_head31
128I/O splitting and DMA buffer allocation in NVMEDevicesrc/blk/spdk/NVMEDevice.cc :: write_split, make_read_tasks, SharedDriverQueueData::alloc_buf_from_pool31
129Little's law for the required queue deptha queueing-theory result; in the code: max_queue_depth = io_queue_size − 1 in SharedDriverQueueData31
130Choosing the replacement gateway (least loaded, with location priority)src/mon/NVMeofGwMap.cc :: NVMeofGwMap::find_failover_candidate, find_failover_gw_logic31
131Randomized scrub scheduling (uniform for shallow, truncated normal for deep)src/osd/scrubber/scrub_job.cc :: ScrubJob::adjust_shallow_schedule, adjust_deep_schedule32
132Choosing the chunk range, shrinking after preemptionsrc/osd/scrubber/pg_scrubber.cc :: PgScrubber::select_range; preemption_data_t::adjust_left in pg_scrubber.h32
133Choosing the authoritative copy in scrubsrc/osd/scrubber/scrub_backend.cc :: ScrubBackend::select_auth_object, possible_auth_shard32
134Computing the recovery and backfill prioritysrc/osd/PeeringState.cc :: get_recovery_priority, get_backfill_priority, clamp_recovery_priority32
135Priority-based reservation grants with preemptionsrc/common/AsyncReserver.h :: AsyncReserver::do_queues, preempt_one32
136Choosing async recovery targets by costsrc/osd/PeeringState.cc :: PeeringState::choose_async_recovery_replicated32
137backfill as a merge-join over sorted hobjectssrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::recover_backfill, scan_range, prep_backfill_object_push32
138Mapping a PG to an op-queue shardsrc/osd/osd_types.h :: spg_t::hash_to_shard; src/osd/OSD.cc :: OSD::enqueue_op33
139The sharded mempool countersrc/common/mempool.cc :: get_num_shards, pick_a_shard_int; include/mempool.h :: pool_allocator::allocate33
140Tuning the cache budget with feedback from the heap (tune_memory)src/common/PriorityCache.cc :: PriorityCache::Manager::tune_memory33
141Dividing memory among caches in priority order with a weighted fair sharesrc/common/PriorityCache.cc :: Manager::balance, balance_priority; BlueStore.h :: MempoolCache::request_cache_bytes33
142Choosing the NUMA node for the OSDsrc/osd/OSD.cc :: OSD::set_numa_affinity33
143The pg log length budget per PGOSDService::get_target_pg_log_entries in src/osd/OSD.cc; trimming in PeeringState::calc_trim_to with osd_pg_log_trim_min = 10033
144Comparing two hobject_t values and the bitwise keysrc/common/hobject.cc :: cmp(const hobject_t&, const hobject_t&); src/common/hobject.h :: hobject_t::_reverse_bits, get_bitwise_key_u3234
145Choosing the shard for an opsrc/osd/OSD.cc :: OSD::enqueue_op, OSD::ShardedOpWQ::_enqueue; src/osd/osd_types.h :: spg_t::hash_to_shard34
146The op admission gates on the primarysrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::do_request, do_op_impl34
147Detecting duplicate requests with the pg log and dupssrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::check_in_progress_op; src/osd/PGLog.h :: IndexedLog::get_request34
148Setting version and user_version and building the log entrysrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::execute_ctx, prepare_transaction, finish_ctx34
149The key names of log and dup entriessrc/osd/osd_types.cc :: eversion_t::get_key_name, pg_log_dup_t::get_key_name; src/osd/osd_types.h :: infover_key, fastinfo_key34
150Recording a past interval and determining maybe_went_rwsrc/osd/osd_types.cc :: PastIntervals::is_new_interval, PastIntervals::check_new_interval35
151Building the prior set and detecting a down PGsrc/osd/osd_types.h :: PastIntervals::PriorSet::PriorSet; src/osd/osd_types.cc :: PastIntervals::iterate_mayberw_back_to35
152merge_log: merging the authoritative log into the local logsrc/osd/PGLog.cc :: PGLog::merge_log, PGLog::rewind_divergent_log35
153The five cases for handling an object's divergent entriessrc/osd/PGLog.h :: PGLog::_merge_object_divergent_entries35
154The target log length and computing trim_tosrc/osd/OSD.cc :: OSDService::get_target_pg_log_entries; src/osd/PeeringState.cc :: PeeringState::calc_trim_to35
155The recovery order in one round of start_recovery_opssrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::start_recovery_ops, recover_primary, recover_replicas, recover_backfill35
156Comparing backfill intervalssrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::recover_backfill, scan_range_primary, scan_range_replica35
157make_writeable: creating a clone before the first write after a snapshotsrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::make_writeable, _make_clone36
158Mapping a snapid to a clone on readsrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::find_object_context36
159Trimming a clone for a deleted snapsrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::trim_object; src/osd/SnapMapper.cc :: SnapMapper::get_next_objects_to_trim36
160The watch lifecycle and notify completionsrc/osd/Watch.cc :: Watch::connect, Watch::got_ping, Notify::maybe_complete_notify, Notify::do_timeout36
161Running a cls method inside the op transactionsrc/osd/PrimaryLogPG.cc :: PrimaryLogPG::do_osd_ops (case CEPH_OSD_OP_CALL); src/osd/ClassHandler.cc; src/osd/objclass.cc :: cls_cxx_*36
162Mapping an image offset to (object, offset within the object)src/osdc/Striper.cc :: Striper::file_to_extents37
163Computing each object's change state between two snapshotssrc/librbd/object_map/DiffRequest.cc :: DiffRequest::handle_load_object_map37
164A write passing through the dispatch chainsrc/librbd/io/ImageDispatcher.cc; src/librbd/io/ObjectDispatcher.cc; src/librbd/io/ImageRequest.cc :: ImageWriteRequest; src/librbd/io/ObjectRequest.cc :: ObjectWriteRequest38
165copyup: filling a clone object from the parent before the first writesrc/librbd/io/ObjectRequest.cc :: AbstractObjectWriteRequest::compute_parent_info, send_write, handle_write_object; src/librbd/io/CopyupRequest.cc; src/cls/rbd/cls_rbd.cc :: copyup38
166Acquiring exclusive-lock and breaking a dead owner's locksrc/librbd/ManagedLock.cc; src/librbd/managed_lock/AcquireRequest.cc, BreakRequest.cc, Utils.cc :: encode_lock_cookie; src/librbd/ExclusiveLock.cc38
167The writearound layersrc/librbd/cache/WriteAroundObjectDispatch.cc :: dispatch_io, block_overlapping_io, flush38
168The token bucket in librbd QoSsrc/common/Throttle.cc :: TokenBucketThrottle::add_tokens, get; src/librbd/io/QosImageDispatch.cc38
169Appending an event to the journal and choosing the objectsrc/journal/JournalRecorder.cc :: JournalRecorder::append, get_object; src/journal/Entry.cc :: Entry::encode39
170Writing with journaling: event first, then datasrc/librbd/Journal.cc :: append_write_event, append_io_event, commit_io_event; src/librbd/journal/ObjectDispatch.cc39
171Replaying journal events in rbd-mirrorsrc/tools/rbd_mirror/image_replayer/journal/Replayer.cc; EventPreprocessor.cc; src/librbd/journal/Replay.cc39
172One replay round in snapshot modesrc/tools/rbd_mirror/image_replayer/snapshot/Replayer.cc :: scan_local_mirror_snapshots, scan_remote_mirror_snapshots, copy_snapshots, create_non_primary_snapshot, copy_image, update_non_primary_snapshot, unlink_peer39
173Leader election and assigning images to instancessrc/tools/rbd_mirror/LeaderWatcher.cc, InstanceWatcher.cc, ImageMap.cc, image_map/SimplePolicy.cc39
174prepare and complete in the bucket indexsrc/cls/rgw/cls_rgw.cc :: rgw_bucket_prepare_op, rgw_bucket_complete_op, rgw_dir_suggest_changes; src/rgw/driver/rados/rgw_rados.cc :: RGWRados::Bucket::UpdateIndex40
175link_olh: adding a version and setting the current versionsrc/cls/rgw/cls_rgw.cc :: rgw_bucket_link_olh; src/rgw/driver/rados/rgw_rados.cc :: RGWRados::set_olh, apply_olh_log40
176Setting the head, chunk and stripe sizes for a PUTsrc/rgw/driver/rados/rgw_putobj_processor.cc :: AtomicObjectProcessor::prepare; src/rgw/rgw_obj_manifest.cc :: set_trivial_rule40
177Multipart upload: init, part and completesrc/rgw/driver/rados/rgw_sal_rados.cc :: RadosMultipartUpload::init, complete; src/rgw/driver/rados/rgw_putobj_processor.cc :: MultipartObjectProcessor::complete; src/rgw/rgw_multi.h40
178The processing pipeline of a requestsrc/rgw/rgw_process.cc :: process_request, rgw_process_authenticated; src/rgw/rgw_asio_frontend.cc41
179Checking an AWS SigV4 signaturesrc/rgw/rgw_auth_s3.cc :: get_v4_canonical_headers, get_v4_string_to_sign, get_v4_signing_key, get_v4_signature; src/rgw/rgw_auth_s3.h :: RGW_AUTH_GRACE41
180Data flow in PUT and GETsrc/rgw/driver/rados/rgw_putobj_processor.cc; src/rgw/rgw_op.cc :: RGWPutObj::execute, RGWGetObj::execute; src/rgw/driver/rados/rgw_rados.cc :: get_obj_iterate41
181Checking bucket and user quotassrc/rgw/rgw_quota.cc :: RGWQuotaHandlerImpl::check_quota, RGWQuotaInfoDefApplier, RGWQuotaInfoRawApplier; src/rgw/rgw_common.h :: rgw_rounded_objsize41
182A token bucket in each RGWsrc/rgw/rgw_ratelimit.h :: RateLimiterEntry; src/rgw/rgw_process.cc41
183The gc queue and its processingsrc/rgw/driver/rados/rgw_gc.cc :: RGWGC::tag_index, send_chain, process; src/cls/rgw_gc41
184Scheduling and running lifecyclesrc/rgw/rgw_lc.cc :: get_lc_index, RGWLC::process, bucket_lc_process, LCOpAction_*; src/rgw/rgw_lc.h41
185Committing a periodsrc/rgw/rgw_zone.cc :: commit_period; src/rgw/rgw_period.cc42
186Incremental sync of a datalog shardsrc/rgw/driver/rados/rgw_data_sync.cc :: RGWDataSyncShardCR, RGWDataIncSyncShardCR, RGWDataSyncSingleEntryCR, RGWDataFullSyncShardCR42
187Syncing a bucket shard and an objectsrc/rgw/driver/rados/rgw_data_sync.cc :: RGWSyncBucketCR, RGWBucketFullSyncCR, RGWBucketShardIncrementalSyncCR, RGWObjFetchCR; src/rgw/driver/rados/rgw_rados.cc :: fetch_remote_obj, obj_time_weight42
188metadata sync from the master zonesrc/rgw/driver/rados/rgw_sync.cc :: RGWMetaSyncCR, RGWMetaSyncShardCR, RGWMetaSyncSingleEntryCR42