mirror of
https://github.com/ceph/ceph
synced 2025-01-02 09:02:34 +00:00
rgw: make radosgw object stat RGW_ATTR_COMPRESSION dump readable
Signed-off-by: fang yuxiang fang.yuxiang@eisoo.com
This commit is contained in:
parent
158f3173de
commit
a5896e5c01
@ -5886,6 +5886,8 @@ next:
|
||||
handled = dump_string("tag", bl, formatter);
|
||||
} else if (iter->first == RGW_ATTR_ETAG) {
|
||||
handled = dump_string("etag", bl, formatter);
|
||||
} else if (iter->first == RGW_ATTR_COMPRESSION) {
|
||||
handled = decode_dump<RGWCompressionInfo>("compression", bl, formatter);
|
||||
}
|
||||
|
||||
if (!handled)
|
||||
|
@ -1634,3 +1634,17 @@ void RGWLifecycleConfiguration::dump(Formatter *f) const
|
||||
}
|
||||
f->close_section();
|
||||
}
|
||||
|
||||
void compression_block::dump(Formatter *f) const
|
||||
{
|
||||
f->dump_unsigned("old_ofs", old_ofs);
|
||||
f->dump_unsigned("new_ofs", new_ofs);
|
||||
f->dump_unsigned("len", len);
|
||||
}
|
||||
|
||||
void RGWCompressionInfo::dump(Formatter *f) const
|
||||
{
|
||||
f->dump_string("compression_type", compression_type);
|
||||
f->dump_unsigned("orig_size", orig_size);
|
||||
::encode_json("blocks", blocks, f);
|
||||
}
|
||||
|
@ -196,6 +196,7 @@ struct compression_block {
|
||||
::decode(len, bl);
|
||||
DECODE_FINISH(bl);
|
||||
}
|
||||
void dump(Formatter *f) const;
|
||||
};
|
||||
WRITE_CLASS_ENCODER(compression_block)
|
||||
|
||||
@ -224,6 +225,7 @@ struct RGWCompressionInfo {
|
||||
::decode(blocks, bl);
|
||||
DECODE_FINISH(bl);
|
||||
}
|
||||
void dump(Formatter *f) const;
|
||||
};
|
||||
WRITE_CLASS_ENCODER(RGWCompressionInfo)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user