X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fcrimson%2Fos%2Fseastore%2Fonode_manager%2Fstaged-fltree%2Fnode_types.h;h=c5ee76b71bca8ec408db03240ee839d4e63ebe6a;hb=20effc670b57271cb089376d6d0800990e5218d5;hp=6774544c717d24fcb71a3596ce89842dc4037c17;hpb=a71831dadd1e1f3e0fa70405511f65cc33db0498;p=ceph.git diff --git a/ceph/src/crimson/os/seastore/onode_manager/staged-fltree/node_types.h b/ceph/src/crimson/os/seastore/onode_manager/staged-fltree/node_types.h index 6774544c7..c5ee76b71 100644 --- a/ceph/src/crimson/os/seastore/onode_manager/staged-fltree/node_types.h +++ b/ceph/src/crimson/os/seastore/onode_manager/staged-fltree/node_types.h @@ -61,4 +61,51 @@ constexpr match_stat_t MSTAT_LT3 = 3; // key < index [pool/shard] constexpr match_stat_t MSTAT_MIN = MSTAT_END; constexpr match_stat_t MSTAT_MAX = MSTAT_LT3; +enum class node_delta_op_t : uint8_t { + INSERT, + SPLIT, + SPLIT_INSERT, + UPDATE_CHILD_ADDR, + ERASE, + MAKE_TAIL, + SUBOP_UPDATE_VALUE = 0xff, +}; + +/** nextent_state_t + * + * The possible states of tree node extent(NodeExtentAccessorT). + * + * State transition implies the following capabilities is changed: + * - mutability is changed; + * - whether to record; + * - memory has been copied; + * + * load()----+ + * | + * alloc() v + * | +--> [READ_ONLY] ---------+ + * | | | | + * | | prepare_mutate() | + * | | | | + * | v v v + * | +--> [MUTATION_PENDING]---+ + * | | | + * | | rebuild() + * | | | + * | v v + * +------->+--> [FRESH] <------------+ + * + * Note that NodeExtentAccessorT might still be MUTATION_PENDING/FRESH while + * the internal extent has become DIRTY after the transaction submission is + * started while nodes destruction and validation has not been completed yet. + */ +enum class nextent_state_t : uint8_t { + READ_ONLY = 0, // requires mutate for recording + // CLEAN/DIRTY + MUTATION_PENDING, // can mutate, needs recording + // MUTATION_PENDING + FRESH, // can mutate, no recording + // INITIAL_WRITE_PENDING +}; + }