If the client is old and doesn't understand tiering, don't let them use a
tiered pool. Reply with EOPNOTSUPP.
Fixes: #8714
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
void _dump(utime_t now, Formatter *f) const;
+ bool has_feature(uint64_t f) const {
+ return request->get_connection()->has_feature(f);
+ }
+
private:
Message *request; /// the logical request we are tracking
osd_reqid_t reqid;
waiting_for_active.push_back(op);
return;
}
+ // verify client features
+ if ((pool.info.has_tiers() || pool.info.is_tier()) &&
+ !op->has_feature(CEPH_FEATURE_OSD_CACHEPOOL)) {
+ osd->reply_op_error(op, -EOPNOTSUPP);
+ return;
+ }
do_op(op); // do it now
break;