Page MenuHomeFreeBSD

Provide an option to force synchronous initialization of inode blocks
ClosedPublic

Authored by markj on Dec 8 2017, 8:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 2:24 PM
Unknown Object (File)
Wed, Dec 4, 5:14 AM
Unknown Object (File)
Wed, Dec 4, 4:54 AM
Unknown Object (File)
Tue, Dec 3, 11:09 PM
Unknown Object (File)
Tue, Dec 3, 2:14 AM
Unknown Object (File)
Nov 22 2024, 10:08 AM
Unknown Object (File)
Oct 30 2024, 1:55 AM
Unknown Object (File)
Oct 4 2024, 10:25 PM
Subscribers

Details

Summary

Per the comment, we use an ordered write to guarantee that the
initialized block is written before the updated cylinder group header.
However, I've found that a number of GEOMs don't properly handle
BIO_ORDERED, so babarrierwrite() doesn't necessarily work as advertised.
I plan to fix at least gmirror, but in the meantime, I believe it's
useful to have a flag to work around the problem. The default value
configures the current behaviour, i.e., inode initialization is still
done asynchronously.

In a test where I untar a large file hierarchy onto a newly initialized
filesystem, the time required goes up by about 50% with
doasyncinodeinit=0 configured.

Longer-term I wonder if it might be possible to integrate this
dependency into SU. It doesn't look like we handle the case where
an async inode initialization returns with a write error, but the CG
update succeeds.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I believe that the correct solution is to make barrier writes work correctly as they can be used to solve a multitude of problems. Indeed I would use them more extensively in UFS if I believed that they worked. That said, I suggest a comment over the definition of the doasyncinodeinit that explains that synchronous inode initialization is only needed when barrier writes do not work.

This revision is now accepted and ready to land.Dec 9 2017, 1:04 AM
This revision was automatically updated to reflect the committed changes.