On 07/29/2013 08:38 PM, Ric Wheeler wrote:
If application A does a stat or statvfs() call, sees 1GB of space left
and then does a write, we could easily lose that race to any other
application.
If you want to reserve space, you need to grab the space yourself
(always works with a large "write()" but preallocation can also help
without dm-thin).
In order to have it work "always", you'll have to write unpredictable
data. If you write just zeros, the reservation isn't guaranteed if the
file system supports compression.
I'm pretty sure we want a crass layering violation for this one
(probably a new mode flag for fallocate), to ensure proper storage
reservation for things like VM images.
--
Florian Weimer / Red Hat Product Security Team
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct