The reason why this is different than the other bug is because we know we *always* need some overhead for file system metadata, but we do not always need extra space above and beyond that.
Here's a thought: what if we create the file system and use statvfs() to examine f_bfree/f_bavail. If those numbers are too high, bisect downward until we get a good fit. This would be slower but more efficient.
The reason why this is different than the other bug is because we know we *always* need some overhead for file system metadata, but we do not always need extra space above and beyond that.
Here's a thought: what if we create the file system and use statvfs() to examine f_bfree/f_bavail. If those numbers are too high, bisect downward until we get a good fit. This would be slower but more efficient.