From 2f5af83f5dbcdd1eebcf8e6e7bf8e9266c672804 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 16 Apr 2012 14:12:32 -0700 Subject: [PATCH] Filestore: fix guard errors in COLL_REMOVE and COLL_MOVE Use object rather than collection check in COLL_REMOVE. Adjust COLL_MOVE check for -1/1 distinction. Signed-off-by: Samuel Just --- src/os/FileStore.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index cb22a40d1aa57..d5950ed5606f9 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -2713,7 +2713,7 @@ unsigned FileStore::_do_transaction(Transaction& t, uint64_t op_seq, int trans_n { coll_t cid = i.get_cid(); hobject_t oid = i.get_oid(); - if (_check_replay_guard(cid, spos) > 0) + if (_check_replay_guard(cid, oid, spos) > 0) r = _collection_remove(cid, oid); } break; @@ -2726,7 +2726,7 @@ unsigned FileStore::_do_transaction(Transaction& t, uint64_t op_seq, int trans_n hobject_t oid = i.get_oid(); r = _collection_add(ocid, ncid, oid, spos); if (r == 0 && - _check_replay_guard(ocid, oid, spos)) + (_check_replay_guard(ocid, oid, spos) > 0)) r = _collection_remove(ocid, oid); } break; -- 2.39.5