1 2 3
This is a pretty straight rip from the e2fsprogs pkg. See README's in subdirs for specific info.