On 27/06/2020 11:00, Florian Weimer wrote:
* Josef Bacik:

As for your ENOSPC issue, I've made improvements on that area.  I
see this in production as well, I have monitoring in place to deal
with the machine before it gets to this point.  That being said if
you run the box out of metadata space things get tricky to fix.
I've been working my way down the list of issues in this area for
years, this last go around of patches I sent were in these corner
Is there anything we need to do in userspace to improve the behavior
of fflush and similar interfaces?

This is not strictly a btrfs issue: Some of us are worried about
scenarios where the write system call succeeds and the data never
makes it to storage *without a catastrophic failure*.  (I do not
consider running out of disk space a catastrophic failure.)  NFS
apparently has this property, and you have to call fsync or close the
descriptor to detect this.  fsync is not desirable due to its
performance impact.

It doesn't matter which filesystem you use, you can't be sure that the data is really safe on disk without calling fsync. In the case of a new inode, that means fsync on the file and on the containing directory.

There can be performance issues depending on how that is done, however there are a number of solutions to those issues which can reduce the performance effects to the point where they are usually no longer a problem. That is with the caveat that slow storage will always be slow, of course!

The usual tricks are to avoid doing lots of small fsyncs, by gathering up smaller files, ideally sorting them into inode number order for local filesystems, and then issuing fsyncs asynchronously, waiting for them all only once all the fsyncs have been issued. Also fadvise/madvise can be useful in these situations too,


devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 

Reply via email to