e2size

A simple library for ext2/3/4 size calculation based on the superblock