imgutils: reduce default overhead to 128 blocks
generally we don't need ~4MB extra space.
This commit is contained in:
parent
d7f05f1386
commit
bcc6f91f73
@ -140,12 +140,12 @@ def round_to_blocks(size, blocksize):
|
|||||||
size += blocksize - diff
|
size += blocksize - diff
|
||||||
return size
|
return size
|
||||||
|
|
||||||
def estimate_size(rootdir, graft={}, fstype=None, blocksize=4096, overhead=1024):
|
# TODO: move filesystem data outside this function
|
||||||
|
def estimate_size(rootdir, graft={}, fstype=None, blocksize=4096, overhead=128):
|
||||||
getsize = lambda f: os.lstat(f).st_size
|
getsize = lambda f: os.lstat(f).st_size
|
||||||
if fstype == "btrfs":
|
if fstype == "btrfs":
|
||||||
overhead = 64*1024 # don't worry, it's all sparse
|
overhead = 64*1024 # don't worry, it's all sparse
|
||||||
if fstype in ("vfat", "msdos"):
|
if fstype in ("vfat", "msdos"):
|
||||||
overhead = 128
|
|
||||||
blocksize = 2048
|
blocksize = 2048
|
||||||
getsize = lambda f: os.stat(f).st_size # no symlinks, count as copies
|
getsize = lambda f: os.stat(f).st_size # no symlinks, count as copies
|
||||||
total = overhead*blocksize
|
total = overhead*blocksize
|
||||||
|
Loading…
Reference in New Issue
Block a user