+ __uint64_t icount;
+ uint i, flags = KM_SLEEP | KM_MAYFAIL;
+
+ if (!mp->m_ihsize) {
+ icount = mp->m_maxicount ? mp->m_maxicount :
+ (mp->m_sb.sb_dblocks << mp->m_sb.sb_inopblog);
+ mp->m_ihsize = 1 << max_t(uint, xfs_highbit64(icount) / 3, 8);
+ mp->m_ihsize = min_t(uint, mp->m_ihsize, 16 * PAGE_SIZE);
+ }