return nspace;
}
+ /**
+ * PG_LOCAL_NS
+ *
+ * Used exclusively by crimson at this time.
+ *
+ * Namespace for objects maintained by the local pg instantiation updated
+ * independently of the pg log. librados IO to this namespace should fail.
+ * Listing operations related to pg objects should exclude objects in this
+ * namespace along with temp objects, ec rollback objects, and the pg
+ * meta object. Such operations include:
+ * - scrub
+ * - backfill
+ * - pgls
+ * See crimson/osd/pg_backend PGBackend::list_objects
+ */
+ static constexpr std::string_view INTERNAL_PG_LOCAL_NS = ".internal_pg_local";
+ bool is_internal_pg_local() const {
+ return nspace == INTERNAL_PG_LOCAL_NS;
+ }
+
bool parse(const std::string& s);
void encode(ceph::buffer::list& bl) const;
return hobj.pool >= 0 && hobj.oid.name.empty();
}
+ bool is_internal_pg_local() const {
+ return hobj.is_internal_pg_local();
+ }
+
bool match(uint32_t bits, uint32_t match) const {
return hobj.match_hash(hobj.hash, bits, match);
}
return reply_op_error(pg, -ENAMETOOLONG);
} else if (m->get_hobj().oid.name.empty()) {
return reply_op_error(pg, -EINVAL);
+ } else if (m->get_hobj().is_internal_pg_local()) {
+ // clients are not allowed to write to hobject_t::INTERNAL_PG_LOCAL_NS
+ return reply_op_error(pg, -EINVAL);
} else if (pg->get_osdmap()->is_blocklisted(
get_foreign_connection().get_peer_addr())) {
DEBUGDPP("{}.{}: {} is blocklisted",