- /* Inode size (for extended attributes). The LOV EA size is
- * 32 (EA hdr) + 32 (lov_mds_md) + stripes * 24 (lov_ost_data),
- * and we want some margin above that for ACLs, other EAs... */
+ /* Inode size includes:
+ * ldiskfs inode size: 156
+ * extended attributes size, including:
+ * ext4_xattr_header: 32
+ * LOV EA size: 32(lov_mds_md) +
+ * stripes * 24(lov_ost_data) +
+ * 16(xattr_entry) + 3(lov)
+ * LMA EA size: 24(lustre_mdt_attrs) +
+ * 16(xattr_entry) + 3(lma)
+ * link EA size: 24(link_ea_header) + 18(link_ea_entry) +
+ * (filename) + 16(xattr_entry) + 4(link)
+ * and some margin for 4-byte alignment, ACLs and other EAs.
+ *
+ * If we say the average filename length is about 32 bytes,
+ * the calculation looks like:
+ * 156 + 32 + (32+24*N+19) + (24+19) + (24+18+~32+20) + other <=
+ * 512*2^m, {m=0,1,2,3}
+ */