From: brian m. carlson Date: Mon, 17 Nov 2025 22:16:15 GMT Subject: [PATCH v2 09/15] write-or-die: add an fsync component for the object map Message-ID: <20251117221621.2863243-10-sandals@crustytoothpaste.net> In-Reply-To: <20251117221621.2863243-1-sandals@crustytoothpaste.net> We'll soon be writing out an object map using the hashfile code. Add an fsync component to allow us to handle fsyncing it correctly. Signed-off-by: brian m. carlson --- write-or-die.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/write-or-die.h b/write-or-die.h index 65a5c42a47..ff0408bd84 100644 --- a/write-or-die.h +++ b/write-or-die.h @@ -21,6 +21,7 @@ enum fsync_component { FSYNC_COMPONENT_COMMIT_GRAPH = 1 << 3, FSYNC_COMPONENT_INDEX = 1 << 4, FSYNC_COMPONENT_REFERENCE = 1 << 5, + FSYNC_COMPONENT_OBJECT_MAP = 1 << 6, }; #define FSYNC_COMPONENTS_OBJECTS (FSYNC_COMPONENT_LOOSE_OBJECT | \ @@ -44,7 +45,8 @@ enum fsync_component { FSYNC_COMPONENT_PACK_METADATA | \ FSYNC_COMPONENT_COMMIT_GRAPH | \ FSYNC_COMPONENT_INDEX | \ - FSYNC_COMPONENT_REFERENCE) + FSYNC_COMPONENT_REFERENCE | \ + FSYNC_COMPONENT_OBJECT_MAP) #ifndef FSYNC_COMPONENTS_PLATFORM_DEFAULT #define FSYNC_COMPONENTS_PLATFORM_DEFAULT FSYNC_COMPONENTS_DEFAULT