]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: document remove_watchers race avoidance
authorJosh Durgin <josh.durgin@dreamhost.com>
Tue, 2 Aug 2011 19:17:42 +0000 (12:17 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Tue, 2 Aug 2011 21:17:15 +0000 (14:17 -0700)
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/osd/OSD.cc

index 1f21c87c5c24b8f4375d176cf11f178a3129c103..de9fec2a97e5cf93a1b9d692dd0746767ef82e81 100644 (file)
@@ -4494,6 +4494,11 @@ void OSD::_remove_pg(PG *pg)
     assert(tr == 0);
   }
 
+
+  // remove_watchers and the erasure from the pg_map
+  // must be done together without unlocking the pg lock,
+  // to avoid racing with watcher cleanup in ms_handle_reset
+  // and handle_notify_timeout
   pg->remove_watchers();
 
   // remove from map