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)
Dec 22 2023, 10:46 PM
Unknown Object (File)
Sep 10 2023, 11:06 AM
Unknown Object (File)
Aug 8 2023, 9:34 AM
Unknown Object (File)
Aug 8 2023, 9:33 AM
Unknown Object (File)
Aug 8 2023, 9:32 AM
Unknown Object (File)
Aug 8 2023, 9:24 AM
Unknown Object (File)
May 14 2023, 6:16 AM
Unknown Object (File)
Apr 25 2023, 9:26 AM
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.