commit ed5090bde7497850a6ea654e8308496d518010e3
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Thu Aug 12 01:45:21 2021 +0200

    ext2fs: Disable an expensive check
    
    disk_cache_block_is_ref calls hurd_ihash_find which is very expensive, so
    better disable the checks from record_global_poke and record_indir_poke
    unless building a debugging version.

diff --git a/ext2fs/ext2fs.h b/ext2fs/ext2fs.h
index 2b49d2ea..ba0eaecd 100644
--- a/ext2fs/ext2fs.h
+++ b/ext2fs/ext2fs.h
@@ -505,7 +505,9 @@ record_global_poke (void *ptr)
   block_t block = boffs_block (bptr_offs (ptr));
   void *block_ptr = bptr (block);
   ext2_debug ("(%p = %p)", ptr, block_ptr);
+#ifdef EXT2FS_DEBUG
   assert_backtrace (disk_cache_block_is_ref (block));
+#endif
   global_block_modified (block);
   pokel_add (&global_pokel, block_ptr, block_size);
 }
@@ -531,7 +533,9 @@ record_indir_poke (struct node *node, void *ptr)
   block_t block = boffs_block (bptr_offs (ptr));
   void *block_ptr = bptr (block);
   ext2_debug ("(%llu, %p)", node->cache_id, ptr);
+#ifdef EXT2FS_DEBUG
   assert_backtrace (disk_cache_block_is_ref (block));
+#endif
   global_block_modified (block);
   pokel_add (&diskfs_node_disknode (node)->indir_pokel, block_ptr, block_size);
 }
