]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: improve debugging for fragment size check
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 6 Oct 2021 15:09:48 +0000 (11:09 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 7 Oct 2021 19:08:31 +0000 (15:08 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/Server.cc

index 2b24ba6bafc31a1e4c89783c0d8fd73ee2c1f957..095001076220f41d4eda6095d95843c5c2597623 100644 (file)
@@ -3202,13 +3202,16 @@ bool Server::check_access(MDRequestRef& mdr, CInode *in, unsigned mask)
  * check whether fragment has reached maximum size
  *
  */
-bool Server::check_fragment_space(MDRequestRef &mdr, CDir *in)
+bool Server::check_fragment_space(MDRequestRef &mdr, CDir *dir)
 {
-  const auto size = in->get_frag_size();
-  if (size >= g_conf()->mds_bal_fragment_size_max) {
-    dout(10) << "fragment " << *in << " size exceeds " << g_conf()->mds_bal_fragment_size_max << " (CEPHFS_ENOSPC)" << dendl;
+  const auto size = dir->get_frag_size();
+  const auto max = g_conf()->mds_bal_fragment_size_max;
+  if (size >= max) {
+    dout(10) << "fragment " << *dir << " size exceeds " << max << " (CEPHFS_ENOSPC)" << dendl;
     respond_to_request(mdr, -CEPHFS_ENOSPC);
     return false;
+  } else {
+    dout(20) << "fragment " << *dir << " size " << size << " < "  << max << dendl;
   }
 
   return true;