GitHub PullRequestReviewCommentEvent at 2014-02-24 13:44:12
Repository: ceph
Actor: liewegas
Payload: {"comment":{"url":"https://api.github.com/repos/ceph/ceph/pulls/comments/9990920","id":9990920,"diff_hunk":"@@ -2670,17 +2670,22 @@ bool PG::sched_scrub()\n \n void PG::reg_next_scrub()\n {\n-  if (scrubber.must_scrub) {\n-    scrubber.scrub_reg_stamp = utime_t();\n-  } else {\n-    scrubber.scrub_reg_stamp = info.history.last_scrub_stamp;\n+  // It is up to primary PG to trigger scrubbing\n+  if (is_primary()) {\n+    if (scrubber.must_scrub) {\n+      scrubber.scrub_reg_stamp = utime_t();\n+    } else {\n+      scrubber.scrub_reg_stamp = info.history.last_scrub_stamp;\n+    }\n+    osd->reg_last_pg_scrub(info.pgid, scrubber.scrub_reg_stamp);\n   }\n-  osd->reg_last_pg_scrub(info.pgid, scrubber.scrub_reg_stamp);\n }\n \n void PG::unreg_next_scrub()\n {\n-  osd->unreg_last_pg_scrub(info.pgid, scrubber.scrub_reg_stamp);\n+  if (is_primary()) {\n+    osd->unreg_last_pg_scrub(info.pgid, scrubber.scrub_reg_stamp);\n+  }","path":"src/osd/PG.cc","position":25,"original_position":25,"commit_id":"64eabe9948201c7aefee205785d55a3baf0d965b","original_commit_id":"64eabe9948201c7aefee205785d55a3baf0d965b","user":{"login":"liewegas","id":433031,"avatar_url":"https://gravatar.com/avatar/a2a43beac749e2858f599f9d7ea9c093?d=https%3A%2F%2Fidenticons.github.com%2Fb01767c235ec7a2122a28152ef88a03d.png&r=x","gravatar_id":"a2a43beac749e2858f599f9d7ea9c093","url":"https://api.github.com/users/liewegas","html_url":"https://github.com/liewegas","followers_url":"https://api.github.com/users/liewegas/followers","following_url":"https://api.github.com/users/liewegas/following{/other_user}","gists_url":"https://api.github.com/users/liewegas/gists{/gist_id}","starred_url":"https://api.github.com/users/liewegas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liewegas/subscriptions","organizations_url":"https://api.github.com/users/liewegas/orgs","repos_url":"https://api.github.com/users/liewegas/repos","events_url":"https://api.github.com/users/liewegas/events{/privacy}","received_events_url":"https://api.github.com/users/liewegas/received_events","type":"User","site_admin":false},"body":"These reg/unreg calls bracket every point where scrub_reg_stamp changes.  If the reg state is now going to be dependent on is_primary(), we also need to bracket every place where that state changes, too.  The place to start is PG::start_peering_interval() where the acting etc members get updated.","created_at":"2014-02-24T13:44:12Z","updated_at":"2014-02-24T13:44:12Z","html_url":"https://github.com/ceph/ceph/pull/1309#discussion_r9990920","pull_request_url":"https://api.github.com/repos/ceph/ceph/pulls/1309","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments/9990920"},"html":{"href":"https://github.com/ceph/ceph/pull/1309#discussion_r9990920"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph/pulls/1309"}}}}