Make a well-defined maximum size of an object attribute. Since Linus has
a 64KB limit, and that is what we normally use to back this, use that as
the limit. This means that even when leveldb is backing large xattrs
(as ext4 users must do) we will return EFBIG on >64KB setxattr attempts.
Signed-off-by: Sage Weil <sage@inktank.com>
OPTION(osd_mon_shutdown_timeout, OPT_DOUBLE, 5)
OPTION(osd_max_object_size, OPT_U64, 100*1024L*1024L*1024L) // OSD's maximum object size
+OPTION(osd_max_attr_size, OPT_U64, 65536)
OPTION(filestore, OPT_BOOL, false)
case CEPH_OSD_OP_SETXATTR:
{
+ if (op.xattr.value_len > g_conf->osd_max_attr_size) {
+ result = -EFBIG;
+ break;
+ }
if (!obs.exists) {
t.touch(coll, soid);
ctx->delta_stats.num_objects++;