> + /* splitting root level means moving them all out */ > + if (handle->level == 0) { > + new_root = 1; > + tocopy = ext2fs_le16_to_cpu(eh->eh_entries); > + } else { > + tocopy = ext2fs_le16_to_cpu(eh->eh_entries) / 2; > + } This is probably in the "would be nice" category, but if we know that we are appending to the file, it might actually be better to move all of the entries into one block, and create an empty block to the right. That way, the average density of the leaf nodes will be much closer to 100%, instead of 50% full. This optimization is far more important in the kernel, though. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html