diff mbox series

[RFC,v2,6/7] fsync docs: update for new syncing semantics

Message ID RFC-patch-v2-6.7-c20301d7967-20220323T140753Z-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series bottom-up ns/batched-fsync & "plugging" in object-file.c | expand

Commit Message

Ævar Arnfjörð Bjarmason March 23, 2022, 2:18 p.m. UTC
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 Documentation/config/core.txt | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt
index cf0e9b8b088..f598925b597 100644
--- a/Documentation/config/core.txt
+++ b/Documentation/config/core.txt
@@ -596,12 +596,23 @@  core.fsyncMethod::
   filesystem and storage hardware, data added to the repository may not be
   durable in the event of a system crash. This is the default mode on macOS.
 * `batch` enables a mode that uses writeout-only flushes to stage multiple
-  updates in the disk writeback cache and then does a single full fsync of
-  a dummy file to trigger the disk cache flush at the end of the operation.
-  Currently `batch` mode only applies to loose-object files. Other repository
-  data is made durable as if `fsync` was specified. This mode is expected to
-  be as safe as `fsync` on macOS for repos stored on HFS+ or APFS filesystems
-  and on Windows for repos stored on NTFS or ReFS filesystems.
+  updates in the disk writeback cache and, before doing a full fsync() of
+  on the "last" file that to trigger the disk cache flush at the end of the
+  operation.
++
+Other repository data is made durable as if `fsync` was
+specified. This mode is expected to be as safe as `fsync` on macOS for
+repos stored on HFS+ or APFS filesystems and on Windows for repos
+stored on NTFS or ReFS filesystems.
++
+The `batch` is currently only applies to loose-object files and will
+kick in when using the linkgit:git-unpack-objects[1] and
+linkgit:update-index[1] commands. Note that the "last" file to be
+synced may be the last object, as in the case of
+linkgit:git-unpack-objects[1], or relevant "index" (or in the future,
+"ref") update, as in the case of linkgit:git-update-index[1]. I.e. the
+batch syncing of the loose objects may be deferred until a subsequent
+fsync() to a file that makes them "active".
 
 core.fsyncObjectFiles::
 	This boolean will enable 'fsync()' when writing object files.