summaryrefslogtreecommitdiff
path: root/src/os/ObjectStore.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/ObjectStore.h')
-rw-r--r--src/os/ObjectStore.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h
index 439897f273a..a1cb21c0326 100644
--- a/src/os/ObjectStore.h
+++ b/src/os/ObjectStore.h
@@ -152,6 +152,7 @@ public:
OP_OMAP_SETKEYS = 32, // cid, attrset
OP_OMAP_RMKEYS = 33, // cid, keyset
OP_OMAP_SETHEADER = 34, // cid, header
+ OP_SPLIT_COLLECTION = 35, // cid, bits, destination
};
private:
@@ -295,6 +296,11 @@ public:
void get_keyset(set<string> &keys) {
::decode(keys, p);
}
+ uint32_t get_u32() {
+ uint32_t bits;
+ ::decode(bits, p);
+ return bits;
+ }
};
iterator begin() {
@@ -543,6 +549,21 @@ public:
ops++;
}
+ /// Split collection based on given prefixes
+ void split_collection(
+ coll_t cid,
+ uint32_t bits,
+ uint32_t rem,
+ coll_t destination) {
+ __u32 op = OP_SPLIT_COLLECTION;
+ ::encode(op, tbl);
+ ::encode(cid, tbl);
+ ::encode(bits, tbl);
+ ::encode(rem, tbl);
+ ::encode(destination, tbl);
+ ++ops;
+ }
+
// etc.
Transaction() :
ops(0), pad_unused_bytes(0), largest_data_len(0), largest_data_off(0), largest_data_off_in_tbl(0),