From: Sage Weil Date: Thu, 5 May 2016 16:38:43 +0000 (-0400) Subject: Merge pull request #6664 from ifed01/wip-13848 X-Git-Tag: v11.0.0~136^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=55cf5c6c3d283b8fa2da8e5362067f87c7b05ad9;p=ceph.git Merge pull request #6664 from ifed01/wip-13848 osd: more accurate disk space usage calculation when considering 'whiteout'/empty/small objects. Reviewed-by: Sage Weil --- 55cf5c6c3d283b8fa2da8e5362067f87c7b05ad9 diff --cc src/os/filestore/FileStore.cc index a3e6532dd18,dbd9ca2d5de..deebd20245d --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@@ -5708,26 -5683,14 +5708,32 @@@ void FileStore::set_xattr_limits_via_co m_filestore_max_inline_xattrs = g_conf->filestore_max_inline_xattrs; else m_filestore_max_inline_xattrs = fs_xattrs; + + // Use override value if set + if (g_conf->filestore_max_xattr_value_size) + m_filestore_max_xattr_value_size = g_conf->filestore_max_xattr_value_size; + else + m_filestore_max_xattr_value_size = fs_xattr_max_value_size; + + if (m_filestore_max_xattr_value_size < g_conf->osd_max_object_name_len) { + derr << "WARNING: max attr value size (" + << m_filestore_max_xattr_value_size + << ") is smaller than osd_max_object_name_len (" + << g_conf->osd_max_object_name_len + << "). Your backend filesystem appears to not support attrs large " + << "enough to handle the configured max rados name size. You may get " + << "unexpected ENAMETOOLONG errors on rados operations or buggy " + << "behavior" + << dendl; + } } + uint64_t FileStore::estimate_objects_overhead(uint64_t num_objects) + { + uint64_t res = num_objects * blk_size / 2; //assumes that each object uses ( in average ) additional 1/2 block due to FS allocation granularity. + return res; + } + // -- FSSuperblock -- void FSSuperblock::encode(bufferlist &bl) const