From 3d11e6a16943a492b9230aadc09c3aa01de4d7bd Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 24 Apr 2018 16:58:09 +0800 Subject: [PATCH] osd/PG: fix out of order priority for PG deletion Backfill-full by definition is fuller than near-full and hence should deserve a higher priority. Signed-off-by: xie xingguo --- src/osd/PG.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 3d6abdff24ed5..f6349483526d2 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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; -- 2.39.5