All of lore.kernel.org
 help / color / mirror / Atom feed
* Deferred deletion of ObjectContext
@ 2013-08-15 14:12 Loic Dachary
  2013-08-15 16:54 ` Samuel Just
  0 siblings, 1 reply; 2+ messages in thread
From: Loic Dachary @ 2013-08-15 14:12 UTC (permalink / raw)
  To: Samuel Just; +Cc: Ceph Development

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

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

-- 
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-15 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-15 14:12 Deferred deletion of ObjectContext Loic Dachary
2013-08-15 16:54 ` Samuel Just

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.