]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #6664 from ifed01/wip-13848
authorSage Weil <sage@redhat.com>
Thu, 5 May 2016 16:38:43 +0000 (12:38 -0400)
committerSage Weil <sage@redhat.com>
Thu, 5 May 2016 16:38:43 +0000 (12:38 -0400)
osd: more accurate disk space usage calculation when considering 'whiteout'/empty/small objects.

Reviewed-by: Sage Weil <sage@redhat.com>
1  2 
src/os/ObjectStore.h
src/os/bluestore/BlueStore.h
src/os/filestore/FileStore.cc
src/os/filestore/FileStore.h
src/os/kstore/KStore.h
src/os/memstore/MemStore.h
src/osd/ReplicatedPG.cc

Simple merge
Simple merge
index a3e6532dd1835181e5842c307075688f1b2688a4,dbd9ca2d5dee90ecae124bf080b738e64638826d..deebd20245db48988402ff3a36a2b6da9b0a77b4
@@@ -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
Simple merge
Simple merge
Simple merge
Simple merge