ops++;
}
+ // NOTE: Collection attr operations are all DEPRECATED. new
+ // backends need not implement these at all.
+
/// Set an xattr on a collection
- void collection_setattr(coll_t cid, const char* name, bufferlist& val) {
- string n(name);
- collection_setattr(cid, n, val);
- }
- /// Set an xattr on a collection
- void collection_setattr(coll_t cid, const string& name, bufferlist& val) {
+ void collection_setattr(coll_t cid, const string& name, bufferlist& val)
+ __attribute__ ((deprecated)) {
__u32 op = OP_COLL_SETATTR;
::encode(op, tbl);
::encode(cid, tbl);
}
/// Remove an xattr from a collection
- void collection_rmattr(coll_t cid, const char* name) {
- string n(name);
- collection_rmattr(cid, n);
- }
- /// Remove an xattr from a collection
- void collection_rmattr(coll_t cid, const string& name) {
+ void collection_rmattr(coll_t cid, const string& name)
+ __attribute__ ((deprecated)) {
__u32 op = OP_COLL_RMATTR;
::encode(op, tbl);
::encode(cid, tbl);
ops++;
}
/// Set multiple xattrs on a collection
- void collection_setattrs(coll_t cid, map<string,bufferptr>& aset) {
+ void collection_setattrs(coll_t cid, map<string,bufferptr>& aset)
+ __attribute__ ((deprecated)) {
__u32 op = OP_COLL_SETATTRS;
::encode(op, tbl);
::encode(cid, tbl);
ops++;
}
/// Set multiple xattrs on a collection
- void collection_setattrs(coll_t cid, map<string,bufferlist>& aset) {
+ void collection_setattrs(coll_t cid, map<string,bufferlist>& aset)
+ __attribute__ ((deprecated)) {
__u32 op = OP_COLL_SETATTRS;
::encode(op, tbl);
::encode(cid, tbl);
f->close_section();
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
void ObjectStore::Transaction::generate_test_instances(list<ObjectStore::Transaction*>& o)
{
o.push_back(new Transaction);
t->create_collection(c);
t->collection_move(c, c2, o3);
t->remove_collection(c);
- t->collection_setattr(c, "this", bl);
- t->collection_rmattr(c, "foo");
+ t->collection_setattr(c, string("this"), bl);
+ t->collection_rmattr(c, string("foo"));
t->collection_setattrs(c, m);
o.push_back(t);
}
+
+#pragma GCC diagnostic pop
write_if_dirty(*t);
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
void PG::upgrade(ObjectStore *store, const interval_set<snapid_t> &snapcolls)
{
assert(info_struct_v <= 8);
assert(r == 0);
}
+#pragma GCC diagnostic pop
+
void PG::_upgrade_v7(ObjectStore *store, const interval_set<snapid_t> &snapcolls)
{
unsigned removed = 0;
return 0;
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
int mark_pg_for_removal(ObjectStore *fs, spg_t pgid, ObjectStore::Transaction *t)
{
pg_info_t info(pgid);
return 0;
}
+#pragma GCC diagnostic pop
+
int initiate_new_remove_pg(ObjectStore *store, spg_t r_pgid)
{
if (!store->collection_exists(coll_t(r_pgid)))