Deferred deletion of ObjectContext
Hi Sam,
I've amended https://github.com/ceph/ceph/pull/414 with
https://github.com/dachary/ceph/commit/66e42d0ec29ffdd2edc225f4090a132a50d9665b#L0R4668
bool locked = is_locked();
if (!locked)
lock();
if (obc->ssc)
put_snapset_context(obc->ssc);
if (object_contexts.empty())
kick();
if (!locked)
unlock();This callback may be called at any time and it is not possible to assume the PG is locked when it happens. With manual reference counting, this part of code was guaranteed to be called when the PG was locked. PG::lock() is called at the beginning and PG::unlock() at the end to provide the same guarantee.
It runs ok with https://github.com/ceph/ceph/pull/414#issuecomment-22705040 and https://github.com/ceph/ceph/pull/414#issuecomment-22705040 . If it sounds reasonable to you I'll schedule another rados suite.
Cheers
Signature · 2 lines
Loïc Dachary, Artisan Logiciel Libre All that is necessary for the triumph of evil is that good people do nothing.
Commented on the commit.
-Sam
Quoted 21 lines · Loic Dachary
Hi Sam,
I've amended https://github.com/ceph/ceph/pull/414 with
https://github.com/dachary/ceph/commit/66e42d0ec29ffdd2edc225f4090a132a50d9665b#L0R4668
bool locked = is_locked(); if (!locked) lock(); if (obc->ssc) put_snapset_context(obc->ssc); if (object_contexts.empty()) kick(); if (!locked) unlock();This callback may be called at any time and it is not possible to assume the PG is locked when it happens. With manual reference counting, this part of code was guaranteed to be called when the PG was locked.
PG::lock()is called at the beginning andPG::unlock()at the end to provide the same guarantee.
Quoted 8 lines
It runs ok with https://github.com/ceph/ceph/pull/414#issuecomment-22705040 and https://github.com/ceph/ceph/pull/414#issuecomment-22705040 . If it sounds reasonable to you I'll schedule another rados suite.
Cheers
--
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html