Bug #13968
closedOSD:lock PG when get_pg_or_queue_for_pg method successfully return a PG
0%
Description
Otherwise caller shall race with other PG users, especially with PG removal.
Also, simplify wake_pg_waiters method a little, the input parameter PG is not needed any more.
Updated by Samuel Just about 8 years ago
- Status changed from New to Rejected
The threads that use that method are not allowed to take the pg or osd lock (messenger ms_fast_dispatch threads). The design is intended to tolerate the race. We don't even remove the op wq entries in _remove_pg, everything checks whether then pg is deleting when items are dequeued (and the items have pg refs, so the pg structure itself won't be deleted until all queued items are gone). Reopen if I'm missing something.
Updated by xie xingguo about 8 years ago
Samuel Just wrote:
The threads that use that method are not allowed to take the pg or osd lock (messenger ms_fast_dispatch threads). The design is intended to tolerate the race. We don't even remove the op wq entries in _remove_pg, everything checks whether then pg is deleting when items are dequeued (and the items have pg refs, so the pg structure itself won't be deleted until all queued items are gone). Reopen if I'm missing something.
Got it. Thank you for your patient explaining.