uint64_t ver;
decode_list_index_key(kiter->first, &key, &ver);
- if (!op.list_versions && (!entry.is_current() || !entry.exists)) {
+ if (!op.list_versions && !entry.is_visible()) {
continue;
}
m[key] = entry;
DECODE_FINISH(bl);
}
- bool is_current() { return (flags & RGW_BUCKET_DIRENT_FLAG_CURRENT) != 0; }
+ bool is_current() {
+ int test_flags = RGW_BUCKET_DIRENT_FLAG_VER | RGW_BUCKET_DIRENT_FLAG_CURRENT;
+ return (flags & RGW_BUCKET_DIRENT_FLAG_VER) == 0 ||
+ (flags & test_flags) == test_flags;
+ }
+ bool is_delete_marker() { return (flags & RGW_BUCKET_DIRENT_FLAG_DELETE_MARKER) != 0; }
+ bool is_visible() {
+ return is_current() && !is_delete_marker();
+ }
void dump(Formatter *f) const;
static void generate_test_instances(list<rgw_bucket_dir_entry*>& o);
}
}
}
+ formatter->dump_int("flags", entry.flags);
formatter->close_section();
formatter->flush(cout);
string etag;
string content_type;
string tag;
+ uint32_t flags;
- RGWObjEnt() : size(0) {}
+ RGWObjEnt() : size(0), flags(0) {}
void dump(Formatter *f) const;
};
encode_json("etag", etag, f);
encode_json("content_type", content_type, f);
encode_json("tag", tag, f);
+ encode_json("flags", flags, f);
}
void RGWBucketEnt::dump(Formatter *f) const
e.owner_display_name = dirent.meta.owner_display_name;
e.content_type = dirent.meta.content_type;
e.tag = dirent.tag;
+ e.flags = dirent.flags;
/* oh, that shouldn't happen! */
if (e.key.empty()) {