[LTP] [PATCH] commands/mkfs: Added new testcase to test mkfs(8) command.

Cyril Hrubis chrubis@suse.cz
Tue Nov 3 12:39:23 CET 2015


Hi!
> >> +	mkfs_umount
> >> +
> >> +	if [ $blocknum -gt "$2" ]; then
> >> +		return 1
> >> +	fi
> > 
> > So the size we get as $2 is in kB and df -T reports 1k blocks shouldn't these
> > be equal, or are there any reserved block in play?
> > 
> 
> Indeed, "$blocknum" here is equal to struct statfs'f_blocks, which denotes total
> data blocks in filesystem(df uses statfs(2) to get this info) and does not contain
> some metadata in filesytem, e.g. ext3's journal space size. 

Ok, then we should check for lower bound as well. Something as blocknum
is greater than 90% of size or similar.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the Ltp mailing list