]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore::set_xattr_limits_via_conf: add warning if max xattr size smaller than...
authorSamuel Just <sjust@redhat.com>
Mon, 4 Apr 2016 23:48:28 +0000 (16:48 -0700)
committerSamuel Just <sjust@redhat.com>
Fri, 8 Apr 2016 21:57:16 +0000 (14:57 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/os/filestore/FileStore.cc

index e3a77ca61239373264196ca891d85271d89a5487..95a4f5f7f0c2316845434c17d26583e251abb085 100644 (file)
@@ -5713,6 +5713,18 @@ void FileStore::set_xattr_limits_via_conf()
     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;
+  }
 }
 
 // -- FSSuperblock --