Use a more accurate directory size fudge factor
Bug #1632424 reported by
Barry Warsaw
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Image |
New
|
Low
|
Unassigned |
Bug Description
Unlike LP: #1632085 this bug specifically addresses the 1.5x fudge factor for file system overhead that we apply after calculating the size of the directory to copy into the image. The previous bug was needed to handle the cases of kvm images, which won't resize their file systems automatically.
This bug is related to the file system overhead which is difficult to calculate accurately. E.g. when we copy a directory of files and subdirectories to an ext4 file system, what's the overhead of that file system? Right now we just add 50% more space, but that could be quite wasteful.
I don't know of a more accurate way to calculate this overhead though.
Changed in ubuntu-image: | |
importance: | Undecided → Low |
To post a comment you must log in.
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.