From b13727abde41d9bfb20215f7aa494533ee73bb49 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Wed, 13 May 2026 10:58:01 -0500 Subject: [PATCH] Document readdir merge mutex scope - Explain that the mutex is per readdir call. - Document that only dirent deduplication and list append are serialized. - Clarify that per-branch opendir and getdents64 work runs outside the critical section. --- src/fuse_readdir_cor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fuse_readdir_cor.cpp b/src/fuse_readdir_cor.cpp index 596a27f4..a8ef5c21 100644 --- a/src/fuse_readdir_cor.cpp +++ b/src/fuse_readdir_cor.cpp @@ -43,6 +43,12 @@ FUSE::ReadDirCOR::~ReadDirCOR() #include "fuse_readdir_cor_readdir.icpp" #endif +// Uses a per-call mutex. Lifetime is one readdir operation. It +// serializes the dirent-merge step (dedup'ing of names + append to +// dirents list) across at-most-branches-worth of parallel worker +// tasks. Per-branch opendir + getdents64 run fully outside the +// critical section, so the lock holds only long enough to merge each +// batch. static inline int