From: Sage Weil Date: Thu, 8 May 2014 17:50:51 +0000 (-0700) Subject: osd: discard client ops sent before last_force_op_resend X-Git-Tag: v0.80.2~56 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=268df4862d95bf506ef6f594fdfa8294671babc3;p=ceph.git osd: discard client ops sent before last_force_op_resend If an op is sent before last_force_op_resend, and the client's feature is present, drop the op because we know they will resend. Signed-off-by: Sage Weil (cherry picked from commit 45e79a17a932192995f8328ae9f6e8a2a6348d10) --- diff --git a/src/include/ceph_features.h b/src/include/ceph_features.h index d6c7d6f5f2f..6b2a5fb5053 100644 --- a/src/include/ceph_features.h +++ b/src/include/ceph_features.h @@ -51,6 +51,7 @@ #define CEPH_FEATURE_CRUSH_TUNABLES3 (1ULL<<41) #define CEPH_FEATURE_OSD_PRIMARY_AFFINITY (1ULL<<41) /* overlap w/ tunables3 */ #define CEPH_FEATURE_MSGR_KEEPALIVE2 (1ULL<<42) +#define CEPH_FEATURE_OSD_POOLRESEND (1ULL<<43) /* * The introduction of CEPH_FEATURE_OSD_SNAPMAPPER caused the feature @@ -122,6 +123,7 @@ static inline unsigned long long ceph_sanitize_features(unsigned long long f) { CEPH_FEATURE_CRUSH_TUNABLES3 | \ CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \ CEPH_FEATURE_MSGR_KEEPALIVE2 | \ + CEPH_FEATURE_OSD_POOLRESEND | \ 0ULL) #define CEPH_FEATURES_SUPPORTED_DEFAULT CEPH_FEATURES_ALL diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 6deb0998b29..69813a41306 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4938,6 +4938,13 @@ bool PG::can_discard_op(OpRequestRef op) return true; } + if (m->get_map_epoch() < pool.info.last_force_op_resend && + m->get_connection()->has_feature(CEPH_FEATURE_OSD_POOLRESEND)) { + dout(7) << __func__ << " sent before last_force_op_resend " + << pool.info.last_force_op_resend << ", dropping" << *m << dendl; + return true; + } + if ((m->get_flags() & (CEPH_OSD_FLAG_BALANCE_READS | CEPH_OSD_FLAG_LOCALIZE_READS)) && op->may_read() &&