Hi!
> +     if ((uint64_t)sf.f_bfree * sf.f_bsize > (uint64_t)size * mult)

While I've tried this code I've found that we should rather be using
sf.f_bavail than sf.f_bfree.

Because f_bfree describes total free blocks while f_bavail describes
block available to use for unprivileged user. So if some test asks for
30GB and the code that creates the file runs as unprivileged user it may
still fail even after this check was successful.

-- 
Cyril Hrubis
chru...@suse.cz

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to