]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: fix out of order priority for PG deletion 21613/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 24 Apr 2018 08:58:09 +0000 (16:58 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 24 Apr 2018 09:11:23 +0000 (17:11 +0800)
Backfill-full by definition is fuller than near-full and hence
should deserve a higher priority.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PG.cc

index 3d6abdff24ed500b9a175dbc6017f3537ca43454..f6349483526d2222a320e8c8aa23eb4b50900939 100644 (file)
@@ -2388,10 +2388,10 @@ unsigned PG::get_backfill_priority()
 unsigned PG::get_delete_priority()
 {
   auto state = get_osdmap()->get_state(osd->whoami);
-  if (state & (CEPH_OSD_NEARFULL |
-              CEPH_OSD_FULL)) {
+  if (state & (CEPH_OSD_BACKFILLFULL |
+               CEPH_OSD_FULL)) {
     return OSD_DELETE_PRIORITY_FULL;
-  } else if (state & CEPH_OSD_BACKFILLFULL) {
+  } else if (state & CEPH_OSD_NEARFULL) {
     return OSD_DELETE_PRIORITY_FULLISH;
   } else {
     return OSD_DELETE_PRIORITY_NORMAL;