]> git.hungrycats.org Git - linux/commitdiff
covers: rb1103 misc-next: Josef data-integrity v2, Filipe's nodatacow/compress patch...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Tue, 3 Nov 2026 20:20:55 +0000 (15:20 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Tue, 3 Nov 2026 20:20:55 +0000 (15:20 -0500)
raid56-fixes, replace-fixes: Josef 1/5 and 5/5 are v2 (code unchanged,
new tags).  stripe-alloc: Josef 2/5-4/5 v2 at the head; 3/5 reworked
("wait for ordered extent IO in fast fsync"), which answers the v1 race
report; 4/5 DEBUG_WARN.  compress-fixes: Filipe Manana's "dont propagate
nodatacow mount option on files with inherited compression" (Qu R-b,
already in btrfs/for-next 75d0e4dd64f2a) replaces our patch 2.  Our
legacy-parent btrfs_inherit_iflags() hunk is dropped with no replacement,
so upstream behaviour applies.  TESTING.md for all four topics has the
rb1103 gate results; 3/5's crash window is BLIND in every harness test.
Not a re-export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
topics/compress-fixes/0000-cover-letter.patch
topics/compress-fixes/TESTING.md
topics/raid56-fixes/0000-cover-letter.patch
topics/raid56-fixes/TESTING.md
topics/replace-fixes/0000-cover-letter.patch
topics/replace-fixes/TESTING.md
topics/stripe-alloc/0000-cover-letter.patch
topics/stripe-alloc/TESTING.md

index b041793adfafcc74047e3c42d90c669380703cab..99f22853c201891839261745e39edbbd69ee3167 100644 (file)
@@ -24,13 +24,21 @@ could only be changed if split across different ioctls, and inodes created
 on older kernels with conflicting flags set would reject changes to almost
 any inode attribute, even the ones not related to compression or datacow.
 
-Patch 2 closes the other way to get the combination patch 1
-refuses: inode creation.  A file created in a directory with chattr +c on
-a filesystem mounted with -o nodatacow inherits COMPRESS from the
-directory and gets NODATACOW from the mount option; a directory that
-already carries both (set by an old kernel) passes both to every new
-inode.  NODATACOW now wins: COMPRESS is dropped when NODATACOW is set at
-creation.  NOCOMPRESS is left alone.
+Patch 2 is Filipe Manana's "btrfs: dont propagate nodatacow mount
+option on files with inherited compression" (Reviewed-by: Qu Wenruo), as
+posted.  It is already in btrfs/for-next (75d0e4dd64f2a) but not in this
+series' base; "git am --skip" drops it.  It closes the other way to get
+the combination patch 1 refuses: inode creation.  A file created in a
+directory with chattr +c on a filesystem mounted with -o nodatacow
+inherited COMPRESS from the directory and got NODATACOW from the mount
+option.  The inherited COMPRESS now wins: the file is not given
+NODATACOW or NODATASUM, and its data is compressed.  It replaces a patch
+of our own that did the opposite (dropped COMPRESS and kept NODATACOW).
+That patch also dropped COMPRESS when the parent directory itself
+already carries both flags (only an old kernel could set that); that
+part is gone with it and has no replacement, so such a directory still
+passes both flags to new files, as upstream does.  Patch 1 keeps those
+files' flags editable.
 
 Patch 3 removes the artificial conflict between NODATACOW and NOCOMPRESS,
 introduced by f37c563bab42 and extended by 0e852ab8974c
@@ -63,27 +71,31 @@ compress-props-test.sh (one FS_IOC_SETFLAGS call per flag case, the three
 regressions of patch 1, strict property values, and the inheritance case
 above) passes on the misc-next and 6.18 test kernels with the series and
 fails on a misc-next base without it exactly in the cases the series
-changes; the inheritance case fails on both lanes without patch 2.
+changes.  Its inheritance cases (the new file is "c", not "C"; chattr +A
+on it works; FIEMAP shows its data encoded, as fstests btrfs/364 checks)
+fail with our old patch 2 and pass with Filipe's.
 fstests btrfs/349 (levels) and btrfs/350 (flag matrix, not upstream yet)
 pass with the series.
 
-Zygo Blaxell (5):
+Filipe Manana (1):
+  btrfs: dont propagate nodatacow mount option on files with inherited
+    compression
+
+Zygo Blaxell (4):
   btrfs: fix nodatacow vs compression inode flag conflict check
-  btrfs: do not leave COMPRESS on an inode that gets NODATACOW at
-    creation
   btrfs: allow NODATACOW | NOCOMPRESS
   btrfs: props: add per-inode compression level support
   btrfs: props: validate compression property values strictly
 
  fs/btrfs/btrfs_inode.h |   7 +++
- fs/btrfs/inode.c       |  11 +++-
+ fs/btrfs/inode.c       |  23 +++++++---
  fs/btrfs/ioctl.c       |  78 ++++++++++++++++++++--------
  fs/btrfs/props.c       | 113 +++++++++++++++++++++++++++++++++++++++--
  fs/btrfs/props.h       |   3 ++
- 5 files changed, 184 insertions(+), 28 deletions(-)
+ 5 files changed, 192 insertions(+), 32 deletions(-)
 
 
-base-commit: bf921b86bdf225f19ffd41533f5c779fba99012e
+base-commit: 83cd81353093be02aa7e60874c413ec340e55bce
 -- 
 2.47.3
 
index ee5a75b884db994d3fa5eb93c4eb02802f729521..dd2c94c97118229a6d892cd9a0dd79bde5925a5b 100644 (file)
@@ -123,11 +123,41 @@ with the candidate, so its regression-3 cases (L1-L3) now use
 `fixtures/compress-legacy-nocow-compr.img.zst`, a 256M image whose
 `legacy-dir/l1..l3` carry NOCOW|COMPR, made on #5 (harness c439612).
 
+## rb1103 (2026-11-03): Filipe Manana's patch replaces patch 2
+
+Zygo, 2026-11-03: follow Filipe.  Patch 2 is now Filipe Manana's "btrfs:
+dont propagate nodatacow mount option on files with inherited compression"
+(Reviewed-by Qu Wenruo, as posted).  It is already in btrfs/for-next
+75d0e4dd64f2a (same patch-id) and drops at the next rebase.  The rule is
+now the opposite of our patch's: a file created in a `+c` directory on a
+`-o nodatacow` mount keeps the inherited COMPRESS and gets neither
+NODATACOW nor NODATASUM.  Our hunk in btrfs_inherit_iflags() went with
+our patch and has no replacement: a parent directory that already carries
+NODATACOW|COMPRESS (made by an old kernel) passes both flags on, as
+upstream does.  The "patch 2, promoted 2026-10-19" text and the
+candidate rows above describe the dropped patch.
+
+compress-props-test.sh inherit phase (harness f362735b): I1 the new file
+is "c", not "C" (and not "cC"); I2 chattr +A on it (one FS_IOC_SETFLAGS
+adding NOATIME) is accepted; I3 1 MiB of compressible data plus fsync,
+and every FIEMAP extent is ENCODED (what fstests btrfs/364 checks).  The
+legacy phase can no longer make NOCOW|COMPR inodes, so L1-L3 use the
+fixture image.
+
+| test | kernel | result | evidence |
+|---|---|---|---|
+| compress-props-test.sh | misc-next zb64 7f75938b139b (7.3.0+ #63, KASAN, Filipe's patch) | PASS: I1 "-c--", I2 "-c-A", I3 8/8 extents encoded; L1-L3 on the fixture pass; every flags/props/persist case passes | raid56-wh-harness `forensics/rb1103-mn/ehive/rb1103mn-cp.log` |
+| same (negative control) | misc-next zb64 00c5fbf36a40 (7.3.0+ #62, our old patch 2) | FAIL in I1-I3 only: "C---", 1 extent, 0 encoded; everything else passes | `forensics/rb1103-mn/ehive/compress-props-neg-62.log` |
+
+The 6.18 sibling ran the same negative control on 6.18 #311.  Per-commit
+buildcheck of the topic: 6/6 clean.  The other patches' content and
+messages are unchanged.
+
 ## Not covered / open
 
-- The candidate patch is not covered for the second source it handles (a
-  parent directory that already carries NODATACOW|COMPRESS, which only an
-  old kernel can create); only the mount-option source is tested.
+- (Obsolete since rb1103: the patch that handled a parent directory
+  already carrying NODATACOW|COMPRESS was dropped; that case now follows
+  upstream and passes both flags on.)
 
 ### Questions for Zygo
 
index 724243e1580f6fe9a9d223c6a0bb85c0d3b17057..15e59e6f2739e71e1c85fe84162ea1838a3be959 100644 (file)
@@ -30,8 +30,9 @@ embedded waitqueue.  Under KVM this shows up as recurring
 is silent.  The pair becomes a completion.
 
 Patch 3 is Josef Bacik's "btrfs: don't drop the error of the last split
-bio" (1/5 of his "btrfs: data integrity fixes", 2026-10-30, Reviewed-by:
-Qu Wenruo), as posted.  A split bio's error was dropped when the split
+bio" (1/5 of his "btrfs: data integrity fixes" v2, 2026-11-03,
+Reviewed-by: Qu Wenruo, Reviewed-by: Filipe Manana, Tested-by: Zygo
+Blaxell), as posted; v2 changed only its commit message and tags.  A split bio's error was dropped when the split
 that failed was not the last to complete and the last one succeeded.
 Not raid56-specific.  Fixes: d48e1dea3931.  It replaces our own patch
 for the same bug (identical code, different comment); it is carried
index d39fae66fcc78f032070c7752dc6f8a0d5817928..453fdaedf9edf798823b9c30547e5252d3f2a2cd 100644 (file)
@@ -335,6 +335,18 @@ is never written); the 5WP "counted against the tolerance" failure mode is
 shown with a kernel built to count it: 5WP then fails (B's fsync EIO; the
 plain writer's B silently lost); 6PW, the only other arm run on it, passes.
 
+## rb1103 (2026-11-03): Josef Bacik's v2 of patch 3
+
+Patch 3 is now v2 of Josef's "btrfs: don't drop the error of the last
+split bio" (2026-11-03).  The code is unchanged from v1 (same patch-id,
+same tree); only the message and tags changed (Reviewed-by Qu Wenruo and
+Filipe Manana, Tested-by Zygo Blaxell).  The topic's tip tree is
+byte-identical to the rb1101 one, so nothing here was retested for this
+patch alone.  Per-commit buildcheck clean (11/11).  Kernel: misc-next zb64 7f75938b139b, KASAN inline + lockdep + BTRFS_ASSERT, 7.3.0+ #63, bzImage md5 ff480f5968adee691ca6e80da2c11c32; the
+rb1028-regress runner (write-error-cache 7/7, rmw-writeback,
+scrub-uncorrectable-rc, failing-member-scrub) PASSed on dhive, as in
+rb1101.  Evidence: raid56-wh-harness `forensics/rb1103-mn/`.
+
 ## Not covered / open
 
 - Plain writers (Zygo 2026-10-20: a write is acknowledged when write(2)
index 9eea82769cba6036683822e5b537934b7133b01a..fd106b7c6b3d9319be28dd41b7bfb28d34758d9c 100644 (file)
@@ -13,9 +13,10 @@ behind, and adds an option to abort a replace on uncorrectable data.
 
 On misc-next the topic also carries, at its head and ahead of the
 patches numbered here, Josef Bacik's "btrfs: don't trim the target of a
-device replace" (5/5 of "btrfs: data integrity fixes", 2026-10-30,
-Reviewed-by: Qu Wenruo), as posted, until upstream takes it: FITRIM
-during a replace discarded everything already copied to the target.
+device replace" (5/5 of "btrfs: data integrity fixes" v2, 2026-11-03,
+Reviewed-by: Qu Wenruo, Reviewed-by: Filipe Manana), as posted, until
+upstream takes it: FITRIM during a replace discarded everything already
+copied to the target.  v2 changed only its commit message and tags.
 
 Patch 1 commits the CANCELED state when a replace fails or is canceled.
 btrfs_dev_replace_finishing() updated the item but did not commit, so
index 54a285cbd0bb3c437a4deea0a58db37c49ad24d4..4e84666ea0f53497e0049d74be9b0187ed6bcb43 100644 (file)
@@ -262,6 +262,19 @@ not committed 3 s into the copy); fstrim during a replace on raid6 /
 raid10 / dup data (same code path, not run); scrub during a replace with
 discards.
 
+## rb1103 (2026-11-03): Josef Bacik's v2 of 5/5
+
+Josef's "btrfs: don't trim the target of a device replace" is now v2
+(2026-11-03): code unchanged (same patch-id and tree), message and tags
+refreshed (Reviewed-by Qu Wenruo and Filipe Manana).  Per-commit
+buildcheck clean (12/12).  Kernel: misc-next zb64 7f75938b139b, KASAN inline + lockdep + BTRFS_ASSERT, 7.3.0+ #63, bzImage md5 ff480f5968adee691ca6e80da2c11c32.  ehive: replace-discard-test.sh,
+all 11 cases (the rb1101 set without dasync-raid5), PASS: fstrim-single,
+fstrim-raid1, fstrim-raid5, resume-single (0 discard sectors on the
+target), and the controls dsync-raid1/raid5, dasync-raid1,
+noK-raid1/raid5, mkfsnoK-raid1/raid5.  replace-status-test.sh rc 0;
+replace-uncorrectable-test.sh rc 0 (readback eio_unexpected=0).  Same as
+rb1101.  Evidence: raid56-wh-harness `forensics/rb1103-mn/ehive/`.
+
 ## Not covered / open
 
 - Patch 1's commit-failure branch (the commit after the cleanup fails; only
index b6d74da4a8b0a49032f4d38f89dfc8e823746c2f..1eb92ec79cb230b3aac912cd038473f6f8c0d5d1 100644 (file)
@@ -28,17 +28,20 @@ subtopic they belong to.  The series applies on top of reclaim-fixes
 
 On misc-next the topic also carries, at its head and ahead of the 85
 patches numbered here, three of Josef Bacik's "btrfs: data integrity
-fixes" (2026-10-30), as posted, until upstream takes them: 2/5 "btrfs:
-clear dirty blocks after a delalloc failure" (Reviewed-by: Qu Wenruo),
-3/5 "btrfs: make fsync wait after pre-submission errors" and 4/5
-"btrfs: don't report success for a skipped log sync".  They fix the
-fsync and writeback error paths that a stripe_alloc ENOSPC drop at the
-fill edge goes through.  3/5 is v1 with an open race report: a Sashiko
-"Critical" finding that Qu forwarded on 2026-10-31.  Every caller clears
-folio writeback before can_finish_ordered_extent() sets
-BTRFS_INODE_COW_WRITE_ERROR, so a fast fsync that runs in between still
-sees neither writeback nor the flag and can log the unwritten extent.
-The patch narrows that window and does not close it; no v2 yet.
+fixes" v2 (2026-11-03), as posted, until upstream takes them: 2/5
+"btrfs: clear dirty blocks after a delalloc failure" (Reviewed-by: Qu
+Wenruo, Reviewed-by: Filipe Manana), 3/5 "btrfs: wait for ordered extent
+IO in fast fsync" and 4/5 "btrfs: don't report success for a skipped log
+sync" (Reviewed-by: Filipe Manana).  They fix the fsync and writeback
+error paths that a stripe_alloc ENOSPC drop at the fill edge goes
+through.  3/5 is reworked in v2 and answers the race report on v1 (a
+Sashiko "Critical" finding that Qu forwarded on 2026-10-31: every caller
+cleared folio writeback before BTRFS_INODE_COW_WRITE_ERROR was set, so a
+fast fsync in between could still log the unwritten extent).  v2 drops
+the flag: a fast fsync waits for BTRFS_ORDERED_IO_DONE on the ordered
+extents it collected, which can_finish_ordered_extent() sets only after
+recording BTRFS_ORDERED_IOERR.  In 4/5, v2 turns v1's ASSERT(0, ...)
+into DEBUG_WARN(...).  2/5 changed only its commit message and tags.
 
 The write hole
 ==============
index 9e9dffadee56ad934975c421a92cc682e6788b0f..2dbb9e9cb196c7c18c03fa648880fbe918365b01 100644 (file)
@@ -557,6 +557,47 @@ negative-control kernel: 291 s (scrub) and 301 s (balance; even the idle
 arms waited there).  Limits: the reclaim worker's RO flip, the third caller,
 is not driven.
 
+## rb1103 (2026-11-03): Josef Bacik's v2 of 2/5, 3/5, 4/5 at the topic head
+
+- 2/5: code unchanged (same patch-id and tree), new message and tags.
+- 3/5: reworked, now "btrfs: wait for ordered extent IO in fast fsync".
+  BTRFS_INODE_COW_WRITE_ERROR is gone; a fast fsync waits for
+  BTRFS_ORDERED_IO_DONE on the ordered extents it collected and checks
+  BTRFS_ORDERED_IOERR under ordered_tree_lock.  It replaced v1 in place;
+  the 85 stripe_alloc commits replayed on it without a conflict, and
+  old tip -> new tip is exactly v1 -> v2 (content oracle).
+- 4/5: `ASSERT(0, ...)` became `DEBUG_WARN(...)`.
+
+Builds: per-commit buildcheck from reclaim-fixes, 89/89 clean, and
+low-space 4/4, test-knobs 3/3.  The only fs/btrfs warning of the KASAN
+build is the known btrfs_sync_log() frame size (1072 bytes, as in
+rb1101).  Kernel: misc-next zb64 7f75938b139b, KASAN inline + lockdep + BTRFS_ASSERT, 7.3.0+ #63, bzImage md5 ff480f5968adee691ca6e80da2c11c32.
+
+Gate on dhive (same as rb1101): rb1028-regress without qu-p1, all PASS;
+retire-wait-abort SKIP 77 as before.  enospc-dataloss fsync and nofsync:
+no loss of acked data.  write-error-cache 7/7 PASS.
+
+Which tests can see 3/5's window: **none**.  The bug is a fast fsync that
+returns 0 after logging extents of a failed COW write, and it only shows
+when the log is replayed after a crash.
+- enospc-drop-fsync-test.sh is the only test built for that window (crash
+  image, then log replay).  It was BLIND (77) on raid5 and raid6: no
+  writeback drop was reached.  Same as 10-31 and rb1101.
+- write-error-cache-test.sh fails writes with dm-flakey but checks parity
+  and readback after a commit, with no fsync log replay.  BLIND to the
+  window.  It does exercise the error completion path that 3/5 now waits
+  on.
+- The enospc-dataloss fsync arms sync and do a clean remount, so there is
+  no log replay.  BLIND to the window.
+- log-settle-unwritten-test.sh: an ordered extent ends partly truncated
+  (flags IO_DONE|COMPLETE|TRUNCATED), then a fast fsync.  This is a
+  liveness check of v2's IO_DONE wait.  PASS: the fsync returned, the
+  settle ran (0 -> 2), unwritten_on_end_truncated 0 -> 1.  It does not
+  test write errors.
+
+So v2 3/5 is build- and regression-checked, and its wait is shown not to
+hang.  Its fix is not shown by any test here.  Evidence: raid56-wh-harness `forensics/rb1103-mn/dhive/`.
+
 ## Not covered / open
 
 Patches without a test of their own (covered at most incidentally by the