cout << " bucket check check bucket index\n";
cout << " object rm remove object\n";
cout << " object unlink unlink object from bucket index\n";
+ cout << " objects expire run expired objects cleanup\n";
cout << " quota set set quota params\n";
cout << " quota enable enable quota\n";
cout << " quota disable disable quota\n";
OPT_OBJECT_UNLINK,
OPT_OBJECT_STAT,
OPT_OBJECT_REWRITE,
+ OPT_OBJECTS_EXPIRE,
OPT_BI_GET,
OPT_BI_PUT,
OPT_BI_LIST,
strcmp(cmd, "mdlog") == 0 ||
strcmp(cmd, "metadata") == 0 ||
strcmp(cmd, "object") == 0 ||
+ strcmp(cmd, "objects") == 0 ||
strcmp(cmd, "olh") == 0 ||
strcmp(cmd, "opstate") == 0 ||
strcmp(cmd, "orphans") == 0 ||
return OPT_OBJECT_STAT;
if (strcmp(cmd, "rewrite") == 0)
return OPT_OBJECT_REWRITE;
+ } else if (strcmp(prev_cmd, "objects") == 0) {
+ if (strcmp(cmd, "expire") == 0)
+ return OPT_OBJECTS_EXPIRE;
} else if (strcmp(prev_cmd, "olh") == 0) {
if (strcmp(cmd, "get") == 0)
return OPT_OLH_GET;
}
}
+ if (opt_cmd == OPT_OBJECTS_EXPIRE) {
+ int ret = store->process_expire_objects();
+ if (ret < 0) {
+ cerr << "ERROR: process_expire_objects() processing returned error: " << cpp_strerror(-ret) << std::endl;
+ return 1;
+ }
+ }
+
if (opt_cmd == OPT_BUCKET_REWRITE) {
if (bucket_name.empty()) {
cerr << "ERROR: bucket not specified" << std::endl;
int list_gc_objs(int *index, string& marker, uint32_t max, bool expired_only, std::list<cls_rgw_gc_obj_info>& result, bool *truncated);
int process_gc();
+ int process_expire_objects();
int defer_gc(void *ctx, rgw_obj& obj);
int bucket_check_index(rgw_bucket& bucket,