mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-02 21:00:13 -05:00
- func.readdir=cor appended entries in whichever order branch workers finished. Directory offsets are positions in that list, so a reader reopening an unchanged directory and seeking to a previously issued cookie (NFS does this) could see a duplicate and miss a later entry. Read branches concurrently into their own buffers, then merge and deduplicate them in configured branch order. The merge mutex is gone. - Growing a dirents buffer overwrote the only pointer with realloc's result while recording the new capacity, so an allocation failure leaked the buffer and the next fill wrote through NULL. Grow both vectors without changing pointer, length or capacity until the allocation succeeds, and return ENOMEM. - seq and cosr ignored that failure and served a listing with entries missing. Every policy now returns the error, and libfuse resets the handle's buffer whenever a fill fails, so a later request at a nonzero offset re-enumerates instead of serving a partial or stale listing as success. cosr closes the directories its workers opened when it gives up early. - Document the fill-error contract, which doesn't promise that every branch was read: seq and cosr can treat a branch read error as the end of the directory. Document cor's memory use, and refer to func.getattr, not fuse.getattr. - TEST_readdir_cor_cookie_replay compares cor listings, offsets and inodes with seq and replays cookies on fresh handles. TEST_dirents_allocation injects allocation failures into the dirents code. TEST_readdir_cor_enomem fails one allocation in a mounted daemon for cor and seq and checks the same handle then serves the exact suffix. Performance: cor copies each entry twice and merges serially after the parallel reads. Listing 100,000 entries over 4 tmpfs branches took the same time before and after (81-83 ms per listing for cor:4 and seq). Peak daemon memory for cor:4 dropped from 27.4 MB to 18.7 MB. |
||
|---|---|---|
| .. | ||
| acutest | ||
| boost | ||
| CLI11 | ||
| fmt | ||
| khash | ||
| libfuse | ||
| moodycamel | ||
| nonstd | ||
| rapidhash | ||
| scope_guard | ||
| subprocess | ||