summaryrefslogtreecommitdiffstats
path: root/src/os/Transaction.cc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* os: build without "using namespace std"Kefu Chai2021-08-131-0/+1
| | | | | | | | | | * add "std::" prefix in headers * add "using" declarations in .cc files. so we don't rely on "using namespace std" in one or more included headers. Signed-off-by: Kefu Chai <kchai@redhat.com>
* os: use transparent comparator in ObjectStore::getattrs()Kefu Chai2021-06-291-1/+1
| | | | | | | | | | | | | | for two reasons: - better performance when looking on in the return map if the key is not a string, as we don't need to create a temporary string as the key - improve the performance of crimson::AlienStore, as the latter uses the transparent comparator. as, without this change, we'd have to perform a deep copy to fill up the returned map with its non-transparent-comparator version. Signed-off-by: Kefu Chai <kchai@redhat.com>
* os/Transaction: do not use anonymous aggregate with member having ctorKefu Chai2020-05-271-2/+2
| | | | | | | | | use a single `hint` to replace `hint_type` and `alloc_hint_flags` in the anonymous union. this helps to address the compile error reported by GCC-10 Signed-off-by: Kefu Chai <kchai@redhat.com>
* mon: Build ceph-mon without using namespace declarations in headersAdam C. Emerson2020-03-221-0/+10
| | | | | | | This is part of a series of commits to clean up using namespace at top level in headers. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* src/: s/advance/operator+=/Kefu Chai2020-02-021-3/+3
| | | | | | for better readablity Signed-off-by: Kefu Chai <kchai@redhat.com>
* os/Transaction: dump alloc hint flags in opZengran Zhang2019-07-291-0/+2
| | | | Signed-off-by: Zengran Zhang <zhangzengran@sangfor.com.cn>
* os/objectstore: add new op OP_CREATE for create a new object.Jianpeng Ma2019-06-111-0/+10
| | | | | | | | | | For OP_CREATE in bluestore mean node didn't exist, so skip search form kvdb. This function merged in 22f73ba. But because compatible problem, it revert in 491c254. This commit fix the compatible problem Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
* os: break Transaction of of Objectstore, use in crimsonSamuel Just2019-05-101-3/+47
| | | | | | Transaction is needed in crimson, but not ObjectStore. Signed-off-by: Samuel Just <rexludorum@gmail.com>
* Revert "os/objectstore: add new op OP_CREATE for create a new object."Kefu Chai2018-12-311-10/+0
| | | | | | | This reverts commit 22f73ba62eb1fe337622ea2aefdcd829f8def851. Fixes: http://tracker.ceph.com/issues/37774 Signed-off-by: Kefu Chai <kchai@redhat.com>
* os/objectstore: add new op OP_CREATE for create a new object.Jianpeng Ma2018-11-191-0/+10
| | | | | | For OP_CREATE in bluestore mean node didn't exist, so skip search form kvdb. Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
* os/ObjectStore: add merge_collection operation to TransactionSage Weil2018-09-071-0/+12
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* core: use const_iterator for decodeKefu Chai2018-05-171-1/+1
| | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* Merge branch 'wip-names!-in!-space!' of git://github.com/adamemerson/cephSage Weil2018-01-111-2/+3
|\ | | | | | | | | | | | | | | Reviewed-by: Jesse Williamson <jwilliamson@suse.de> # Conflicts: # src/cls/rbd/cls_rbd.cc # src/cls/rbd/cls_rbd_types.cc
| * os: Use unqualified encode/decodeAdam C. Emerson2018-01-101-2/+3
| | | | | | | | | | | | | | This is a portion of Part 1 of the namespace project: using ADL properly in encode and decode so we can use namespaces easily in Ceph. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* | os/Transaction: print keys when dumping omap_removekeys transactionIgor Fedotov2018-01-031-0/+5
|/ | | | Signed-off-by: Igor Fedotov <ifedotov@suse.com>
* os:startsync can be removedamitkuma2017-07-281-4/+0
| | | | | | | client is still sending write,startsync which is deprecated long back. Hence cleaning up OP_STARTSYNC Fixes: http://tracker.ceph.com/issues/20604 Signed-off-by: Amit Kumar <amitkuma@redhat.com>
* os/ObjectStore: add collection_set_bits opSage Weil2017-03-291-0/+9
| | | | | | | This is only for FileStore, the only one that doesn't already store it. Signed-off-by: Sage Weil <sage@redhat.com>
* os/Transaction: add missing breakSage Weil2016-11-281-0/+1
| | | | | | | CID 1395137 (#1 of 1): Missing break in switch (MISSING_BREAK) unterminated_case: The case for value ObjectStore::Transaction::OP_TRY_RENAME is not terminated by a 'break' statement. Signed-off-by: Sage Weil <sage@redhat.com>
* os/ObjectStore: remove the legacy tbl support completely.Jianpeng Ma2016-11-031-484/+0
| | | | Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
* os/ObjectStore: extend OS interface with set_collection_opts method.Igor Fedotov2016-10-191-1/+0
| | | | Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
* Merge pull request #6208 from liewegas/wip-alloc-hintsSage Weil2016-05-201-1/+1
|\ | | | | | | | | | | librados,osd: rados hints for future access pattern Reviewed-by: Samuel Just <sjust@redhat.com> Reviewed-by: Josh Durgin <jdurgin@redhat.com>
| * osd: support new alloc_hint flagsSage Weil2016-05-141-1/+1
| | | | | | | | | | | | Pass these through to the ObjectStore. Signed-off-by: Sage Weil <sage@redhat.com>
* | os: remove collection attr methodsSage Weil2016-05-131-36/+1
|/ | | | | | | These have been deprecated since hammer, and were only kept so that you could do an offline upgrade from firefly. Bye bye! Signed-off-by: Sage Weil <sage@redhat.com>
* Transaction: handle OP_TRY_RENAME in dumpSamuel Just2016-03-291-0/+11
| | | | Signed-off-by: Samuel Just <sjust@redhat.com>
* os/: add try_renameSamuel Just2016-02-251-0/+14
| | | | | | | Similar to collection_move_rename, except we ignore ENOENT and don't allow different collections. Signed-off-by: Samuel Just <sjust@redhat.com>
* Revert "os: drop deprecated collection_* attr methods"Sage Weil2015-10-161-1/+49
| | | | | | | | | This reverts part of commit 893e00bc0fd793090a35d275919ca0348e9f05b0. [we leave KeyValueStore untouched] Signed-off-by: Sage Weil <sage@redhat.com>
* Transaction.c: replace deprecated function callDanny Al-Gaaf2015-09-101-1/+1
| | | | | | Replace deprecated use of collection_move() with collection_move_rename(). Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* Merge remote-tracking branch 'gh/wip-osd-compat'Sage Weil2015-08-271-49/+1
|\ | | | | | | Reviewed-by: Samuel Just <sjust@redhat.com>
| * os: drop deprecated collection_* attr methodsSage Weil2015-08-201-49/+1
| | | | | | | | | | | | We no longer need these for upgrades. Signed-off-by: Sage Weil <sage@redhat.com>
* | os/ObjectStore: pass bits to create_collectionSage Weil2015-08-191-2/+2
|/ | | | | | | | This informs the backend how many bits of the hash range will be covered by the collection. Those bits are implicitly matched against the spg_t in coll_t. Signed-off-by: Sage Weil <sage@redhat.com>
* osd: use non-string coll_t'sSage Weil2015-06-191-2/+2
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* os/ObjectStore: deprecated collection_moveSage Weil2015-06-191-1/+1
| | | | | | You will not be missed! Signed-off-by: Sage Weil <sage@redhat.com>
* locally disable pragma warnings on gcc < 4.6Josh Durgin2015-02-101-0/+4
| | | | | | | | | | diagnostic push|pop are not present before 4.6, so each use gives a warning. Temporarily ignore these by disabling/reenabling -Wpragmas. Note that this means the other disabled warnings are not scoped on old gcc. I don't think this is worth fixing, since newer gcc will respect the scope and show us the warnings outside of it. Signed-off-by: Josh Durgin <jdurgin@redhat.com>
* osd: build fields for Transaction::iterator when tbl is usedDong Yuan2015-01-061-0/+501
| | | | | | | | | When tbl is used (for compatibility), the Transaction::begin method need to build all fields used by iterator. That includes: coll_index, object_index, data_bl, op_bl, etc.) Change-Id: I48ea74fec8d052f50da254a726a9c0dffead19bc Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
* osd: new Transaction::iterator interfaceDong Yuan2015-01-061-100/+88
| | | | | | | | | | | | This patch add new Transaction::iterator interface according to new encode/decode layout. The new iterator give the whole Op struct in a single decode_op method. All ObjectStore Impl (FileStore/MemStore/KeyValueStore) is also changed to use the new interface. Change-Id: I1900a6ec302890df2c4357b071e4966c26d7f037 Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
* os/ObjectStore: deprecated collection attr operationsSage Weil2014-12-171-2/+7
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* remove collection_renameSage Weil2014-10-281-1/+0
| | | | | | No more users! Complicated semantics! Signed-off-by: Sage Weil <sage@redhat.com>
* os/ObjectStore: remove collection_{add,remove}Sage Weil2014-10-281-2/+0
| | | | | | | Move the add+remove a move normally translates to directly into that method. Signed-off-by: Sage Weil <sage@redhat.com>
* Implement the collection hint transaction, add a new transation type as ↵Guang Yang2014-08-191-0/+11
| | | | | | expected number of objects. Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
* Add a new transaction OP (collection hint) to ObjectStore.Guang Yang2014-08-191-0/+10
| | | | Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
* libosd_types, libos_types, libmon_typesSage Weil2014-07-191-0/+471
Signed-off-by: Sage Weil <sage@redhat.com>