]> git.hungrycats.org Git - linux/commitdiff
allocator-hints: claim only what the space tests measured: unfsynced files lost upstream
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Thu, 12 Nov 2026 23:46:59 +0000 (18:46 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Thu, 12 Nov 2026 23:46:59 +0000 (18:46 -0500)
"Not yet committed" was inferred, not recorded; the cover and TESTING.md
now say the lost files had not been fsynced, pending a commit-timing
measurement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
topics/allocator-hints/0000-cover-letter.patch
topics/allocator-hints/TESTING.md

index baeff8431697a5b733f9049c723c190109db2c0d..55f6c504045c7688d646ef81a4c0a111c1878570 100644 (file)
@@ -47,7 +47,7 @@ estimate behind metadata overcommit, and statfs, counted every device.
 With a DATA_ONLY or NONE_ONLY device, metadata overcommits against
 chunks that cannot be allocated: once the other devices are full the
 transaction aborts with ENOSPC, the filesystem goes read-only, and
-writes that had returned success but were not yet committed are lost.
+files whose writes had returned success but were not fsynced are lost.
 With a METADATA_ONLY device nothing is lost, because data reservations
 never overcommit and the write fails with ENOSPC; only df Avail is too
 high.  The patch shares the hint rules between the allocator and the
@@ -60,8 +60,8 @@ set the third to NONE_ONLY and run a full balance so it holds no
 chunks.  Write 64 MiB files until ENOSPC, then create 2000-byte files
 from four writers until each gets ENOSPC, sync, balance the metadata,
 remount and read everything back.  Without the patch the metadata fill
-aborts the transaction and the files created since the last commit are
-lost; with it the fill ends in ENOSPC and every file reads back.
+aborts the transaction and files that were not fsynced are lost; with
+it the fill ends in ENOSPC and every file reads back.
 Switching the third device to DATA_ONLY after the data fill gives the
 same abort and loss.  With the third device METADATA_ONLY instead, the
 data fill ends in a clean ENOSPC either way, but without the patch df
index f104f795f01e181d8f062b4521a7e7d13bb6a292..0a083a836df41d47ded6fcd00cb48e3d215c331b 100644 (file)
@@ -157,8 +157,8 @@ space_info 26.6 MiB over-reserved) during the metadata fill and again at
 metadata to a clean ENOSPC.  Classification: **ENOSPC transaction abort with loss of acked data**
 (corrected 2026-11-12; the 10-18 text said "not loss of acked data").
 The 24125 lost files were created, written and closed with success
-returns but never fsynced, and were not yet committed when the first
-abort hit.  A plain write() that returned success is acked, so this is
+returns but never fsynced (whether a commit had covered them was not
+recorded; measurement pending, 2026-11-12).  A plain write() that returned success is acked, so this is
 silent loss of acked data, the outcome patch 12 prevents.  What survived:
 every data file synced before the metadata phase (43/43) verifies, and no
 file that had been fsynced or covered by a completed sync was lost.  Mechanism, from the code: the per-profile available