mirror of
https://github.com/ceph/ceph
synced 2025-03-06 16:28:28 +00:00
Merge pull request #7017 from efirs/ef_atomic_ceph_tid
osd: use atomic to generate ceph_tid Reviewed-by: Sage Weil <sage@redhat.com> Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
68a7c04b83
@ -238,7 +238,6 @@ OSDService::OSDService(OSD *osd) :
|
||||
backfill_request_lock("OSD::backfill_request_lock"),
|
||||
backfill_request_timer(cct, backfill_request_lock, false),
|
||||
last_tid(0),
|
||||
tid_lock("OSDService::tid_lock"),
|
||||
reserver_finisher(cct),
|
||||
local_reserver(&reserver_finisher, cct->_conf->osd_max_backfills,
|
||||
cct->_conf->osd_min_recovery_priority),
|
||||
|
@ -798,14 +798,9 @@ public:
|
||||
|
||||
// -- tids --
|
||||
// for ops i issue
|
||||
ceph_tid_t last_tid;
|
||||
Mutex tid_lock;
|
||||
atomic_t last_tid;
|
||||
ceph_tid_t get_tid() {
|
||||
ceph_tid_t t;
|
||||
tid_lock.Lock();
|
||||
t = ++last_tid;
|
||||
tid_lock.Unlock();
|
||||
return t;
|
||||
return (ceph_tid_t)last_tid.inc();
|
||||
}
|
||||
|
||||
// -- backfill_reservation --
|
||||
|
Loading…
Reference in New Issue
Block a user