| | |
|---|---|
| base of every series | `9d01fb77f46e` (`v7.1-102-g9d01fb77`), upstream btrfs-progs `devel` as of 2026-10-29: `testing^1` |
-| integration branch | `testing` `3bc81a49b73f` (octopus of the base and 6 topics) |
+| integration branch | `testing` `14a5fdb4b135` (octopus of the base and 5 topic tips; `scrub-progress-socket` contains `scrub-limit-only-with-option`) |
| upstream `devel` now | `55f4cfb9c932` (one docs-only commit past the base; the lane has not been rebased onto it) |
Unlike the kernel lane's base, this base is a published upstream commit,
cover letter's title and text and regenerates only the mail headers, the
shortlog, the diffstat and the `base-commit:` line. It reports any series
whose patch count changed, so its cover text can be checked, and leaves a
-placeholder for a series that has newly grown to two or more patches. It
-replaces only the `*.patch` files of a topic; `TESTING.md` and any other
+placeholder for a series that has newly grown to two or more patches. A
+topic stacked on another (its branch contains the other topic's branch)
+is exported as the commits on top of that topic, with `--base` set to the
+lane base, so its patches carry `prerequisite-patch-id:` lines for the
+series below it. It replaces only the `*.patch` files of a topic; `TESTING.md` and any other
file next to them is kept, and a directory that is not a topic of
`testing` is reported and left alone.
A re-export also gives every cover letter a new `Date:` header; that
topics/<topic>/0000-cover-letter.patch cover letter (series of 2 or more)
topics/<topic>/TESTING.md tests that verify the series, with results
topics/<topic>/NNNN-<subject>.patch the patches, in branch order
-fixups/post-merge.patch what integrating all series needs (below)
+fixups/post-merge.patch what integrating all series needs, only when non-empty (none now)
scripts/export.sh re-export from ~/share/btrfs-progs, keeping the cover letters
```
## The series
-Listed in the merge order of `testing`, which is also the order the
-integration recipe below uses. Every series applies to the base on its
-own; none is stacked on another.
+Listed in the order the export uses: the merge order of `testing`, with
+a stacked-on series right before the series stacked on it. "on" names
+the series a stacked series applies on top of; the others apply to the
+base.
-| directory | patches | authors | notes |
-|---|---|---|---|
-| `mkfs-remap-tree` | 1 | Zygo | `mkfs.btrfs -O remap-tree` (experimental builds) segfaults in `write_ctree_super()` without it |
-| `dump-tree-replace-stop-time` | 1 | Zygo | dump-tree printed the dev-replace start time as the stop time |
-| `replace-abort-uncorrectable` | 1 | Zygo | `btrfs replace start --abort-on-uncorrectable`; the user space half of the kernel patch "btrfs: dev-replace: optionally abort on uncorrectable read errors" (kernel export `~/share/linux-upstream/topics/replace-fixes/`). Send with or after the kernel series: the flag value is defined there |
-| `scrub-limit-only-with-option` | 2 | Zygo | follows up 01c8277d (Issue #1165) |
-| `logical-resolve-fixes` | 4 | Zygo | Issue #400; patch 4 changes the exit status and moves a message to stderr, and updates misc-tests/042 |
-| `scrub-progress-socket` | 2 | Zygo | independent of `scrub-limit-only-with-option`, but a `--limit` survives the "already running" probe only with it; the two conflict in `scrub_start()` when merged (see the fixup) |
+| directory | patches | on | authors | notes |
+|---|---|---|---|---|
+| `mkfs-remap-tree` | 1 | | Zygo | `mkfs.btrfs -O remap-tree` (experimental builds) segfaults in `write_ctree_super()` without it |
+| `dump-tree-replace-stop-time` | 1 | | Zygo | dump-tree printed the dev-replace start time as the stop time |
+| `replace-abort-uncorrectable` | 1 | | Zygo | `btrfs replace start --abort-on-uncorrectable`; the user space half of the kernel patch "btrfs: dev-replace: optionally abort on uncorrectable read errors" (kernel export `~/share/linux-upstream/topics/replace-fixes/`). Send with or after the kernel series: the flag value is defined there |
+| `logical-resolve-fixes` | 4 | | Zygo | Issue #400; patch 4 changes the exit status and moves a message to stderr, and updates misc-tests/042 |
+| `scrub-limit-only-with-option` | 2 | | Zygo | follows up 01c8277d (Issue #1165) |
+| `scrub-progress-socket` | 2 | `scrub-limit-only-with-option` | Zygo | both change the parent's branch after the fork in `scrub_start()`; patch 2 includes the combined code |
## Applying one series
git am $(ls ~/share/btrfs-progs-upstream/topics/logical-resolve-fixes/*.patch | grep -v 0000-cover-letter)
```
+A stacked series applies after the series it is on, on the same branch:
+`scrub-limit-only-with-option`, then `scrub-progress-socket`.
+
`git am` cannot apply the cover letter (it has no diff), so leave it out.
## Integrating all series
-Build each series on its own branch, merge the branches in the order of
-the table with `-X ours` (conflicting hunks keep the side merged so far),
-then apply the fixup:
+Build each series on its own branch (a stacked one on top of the branch
+it is on) and merge the branches that no other series is stacked on.
+They merge without conflicts, and no fixup is needed:
```sh
cd ~/share/btrfs-progs
P=~/share/btrfs-progs-upstream
B=9d01fb77f46e
ORDER="mkfs-remap-tree dump-tree-replace-stop-time replace-abort-uncorrectable
- scrub-limit-only-with-option logical-resolve-fixes scrub-progress-socket"
+ logical-resolve-fixes scrub-limit-only-with-option scrub-progress-socket"
+declare -A ON=([scrub-progress-socket]=scrub-limit-only-with-option)
for t in $ORDER; do
- git checkout -q -b up/$t $B
+ git checkout -q -b up/$t ${ON[$t]:+up/}${ON[$t]:-$B}
git am -q $(ls $P/topics/$t/*.patch | grep -v 0000-cover-letter)
done
git checkout -q -b up/testing $B
for t in $ORDER; do
- git merge -q --no-edit -X ours up/$t
+ [ "$t" = scrub-limit-only-with-option ] && continue # in scrub-progress-socket
+ git merge -q --no-edit up/$t
done
-git apply --index $P/fixups/post-merge.patch
-git commit -m "post-merge fixups for the btrfs-progs topics"
git diff testing # empty
```
-### What the fixup contains
-
-One hunk in `cmds/scrub.c`, `scrub_start()`, in the parent's branch after
-the fork of a background scrub. `scrub-limit-only-with-option` patch 2
-adds a loop there that clears the parent's `limit_changed` flags (the
-child owns the limits). `scrub-progress-socket` patch 2 adds, in the
-same place, the close of the parent's copy of the progress socket
-without unlinking it. `-X ours` keeps only the first; the fixup adds the
-socket close after it. The resolution is the union of both, in that
-order, as in `testing`.
-
What the export checks, every run:
-1. The patches of every directory, applied in order on the base, give the
- tree of the topic branch.
-2. Merging the series as above and applying `fixups/post-merge.patch`
- gives the tree of `testing`.
+1. The patches of every directory, applied in order on the base (a
+ stacked series after the series it is on), give the tree of the topic
+ branch.
+2. Merging the series as above gives the tree of `testing`. If it ever
+ needs a fixup again, the export writes `fixups/post-merge.patch`, and
+ the merge is done with `-X ours` before applying it.
-The verification used git 2.47. `fixups/post-merge.patch` is generated
-against git's `ort` merge results with `-X ours`. If it does not apply,
-merge without `-X ours` and resolve the one conflict as described above.
+The verification used git 2.47.
## Before sending
carries `Assisted-by: Claude:claude-opus-5-5`.
- Send `replace-abort-uncorrectable` together with, or after, the kernel
replace-fixes series.
+- Send `scrub-progress-socket` after `scrub-limit-only-with-option`, or
+ both together.
- Re-export with `scripts/export.sh` after any lane change, and commit the
result with the `testing` and base SHAs that the script prints.
+++ /dev/null
-diff --git a/cmds/scrub.c b/cmds/scrub.c
-index 1843856bd210973d1fd4d2693114ba4ded079eb3..c286b20dfc9efc03d7337969f5187d681c5f1bc8 100644
---- a/cmds/scrub.c
-+++ b/cmds/scrub.c
-@@ -1567,6 +1567,17 @@ static int scrub_start(const struct cmd_struct *cmd, int argc, char **argv,
- /* The child scrubs and restores the old limits. */
- for (i = 0; i < fi_args.num_devices; ++i)
- sp[i].limit_changed = false;
-+
-+ /*
-+ * The child serves the progress socket and removes it
-+ * when the scrub is finished. Close the parent's copy
-+ * without removing it, or nothing can connect to the
-+ * child.
-+ */
-+ if (prg_fd > -1) {
-+ close(prg_fd);
-+ prg_fd = -1;
-+ }
- scrub_handle_sigint_parent();
- pr_default("scrub %s on %s, fsid %s (pid=%d)\n",
- n_start ? "started" : "resumed",
# that is not a topic of $TESTING is reported and left alone. Nothing is
# ever removed recursively.
#
+# Stacked topics: a topic whose branch contains another topic's branch is
+# exported as the commits on top of that topic (its export parent), with
+# --base set to the lane base, so format-patch adds prerequisite-patch-id
+# lines for the parent's patches. The parent need not be a parent of
+# $TESTING itself: topics under $PFX that are ancestors of a testing parent
+# are exported before it.
+#
# Checks, every run (the script stops with "STOP: ..." on a failure):
-# 1. each series, applied with `git apply` on the base, gives the topic
-# branch's tree;
-# 2. the topic branches merged in $TESTING's parent order (-X ours) plus
-# fixups/post-merge.patch give $TESTING's tree.
+# 1. each series, applied with `git apply` on the base after the series it
+# is stacked on, gives the topic branch's tree;
+# 2. the topic branches that no other topic is stacked on, merged in
+# $TESTING's parent order (-X ours), plus fixups/post-merge.patch give
+# $TESTING's tree. When they give it without a fixup, there is no
+# fixups/post-merge.patch (a stale one is removed).
# No ref is created or moved: merges are built with git merge-tree and
# commit-tree (objects only), patches are checked in a temporary index.
#
TMP=$(mktemp -d); trap 'rm -rf "$TMP"' EXIT
die() { echo "STOP: $*" >&2; exit 1; }
-# --- topics in the merge order of $TESTING
-order=$(for p in $(git log -1 --format=%P "$TESTING" | cut -d' ' -f2-); do
+# --- topics in the merge order of $TESTING; a topic stacked under a
+# testing parent (and not a parent itself) comes right before it
+parents=$(for p in $(git log -1 --format=%P "$TESTING" | cut -d' ' -f2-); do
t=$(git for-each-ref --points-at "$p" --format='%(refname)' "$PFX" | head -1)
[ -n "$t" ] || die "testing parent $p is not a topic tip under $PFX"
echo "${t#"$PFX"}"
done)
-[ -n "$order" ] || die "$TESTING has no topic parents"
+[ -n "$parents" ] || die "$TESTING has no topic parents"
+alltopics=$(git for-each-ref --format='%(refname)' "$PFX" | sed "s|^$PFX||")
+order=$(for p in $parents; do
+ pt=$(git rev-parse "$PFX$p")
+ for q in $alltopics; do
+ [ "$q" = "$p" ] && continue
+ echo "$parents" | grep -qxF "$q" && continue
+ qt=$(git rev-parse "$PFX$q")
+ [ "$qt" != "$B" ] && git merge-base --is-ancestor "$B" "$qt" \
+ && git merge-base --is-ancestor "$qt" "$pt" \
+ && echo "$(git rev-list --count "$B..$qt") $q"
+ done | sort -n | cut -d' ' -f2
+ echo "$p"
+done | awk '!seen[$0]++')
+declare -A EXPPARENT LANEPARENT
for t in $order; do
tip=$(git rev-parse "$PFX$t")
git merge-base --is-ancestor "$B" "$tip" || die "$t is not based on $TESTING^1 ($(git rev-parse --short "$B"))"
[ "$(git rev-list --count --merges "$B..$tip")" = 0 ] || die "$t has merge commits"
[ "$(git rev-list --count "$B..$tip")" -gt 0 ] || die "$t has no commits on the base"
+ # export parent: the earlier topic with the most commits that this one contains
+ lp=$B; best=0; par=
for q in $order; do
- [ "$q" = "$t" ] && continue
- git merge-base --is-ancestor "$(git rev-parse "$PFX$q")" "$tip" \
- && die "$t contains $q: stacked topics are not supported by this script"
+ [ "$q" = "$t" ] && break
+ qt=$(git rev-parse "$PFX$q")
+ git merge-base --is-ancestor "$qt" "$tip" || continue
+ n=$(git rev-list --count "$B..$qt")
+ [ "$n" -gt "$best" ] && { best=$n; lp=$qt; par=$q; }
done
+ EXPPARENT[$t]=$lp; LANEPARENT[$t]=$par
done
# --- post-merge fixup: computed before anything is written, so that a
# STOP leaves $OUT alone.
+# Only the topics no other topic is stacked on are merged.
acc=$B
for t in $order; do
+ leaf=1
+ for u in $order; do [ "${LANEPARENT[$u]}" = "$t" ] && leaf=; done
+ [ -n "$leaf" ] || continue
tip=$(git rev-parse "$PFX$t")
tree=$(git merge-tree --write-tree -X ours --merge-base="$B" "$acc" "$tip" | head -1) \
|| die "merging $t with -X ours failed"
find "$d" -maxdepth 1 -type f -name '*.patch' -delete
done
for t in $order; do
- tip=$(git rev-parse "$PFX$t"); d=$OUT/topics/$t
- n=$(git rev-list --count "$B..$tip")
+ tip=$(git rev-parse "$PFX$t"); d=$OUT/topics/$t; from=${EXPPARENT[$t]}
+ n=$(git rev-list --count "$from..$tip")
args=(--base="$B" -o "$d" --quiet --to="$TO")
if [ "$n" -gt 1 ] || [ -e "$SAVE/$t" ]; then
- git format-patch "${args[@]}" --cover-letter "$B..$tip"
+ git format-patch "${args[@]}" --cover-letter "$from..$tip"
if [ -e "$SAVE/$t" ]; then
python3 -I - "$SAVE/$t" "$d/0000-cover-letter.patch" "$n" "$t" <<'PY'
import sys, re
echo "NOTE $t: new cover letter needed (placeholder left)" >&2
fi
else
- git format-patch "${args[@]}" "$B..$tip"
+ git format-patch "${args[@]}" "$from..$tip"
fi
- echo "$t $n $(git rev-parse --short=12 "$tip")"
+ echo "$t $n $(git rev-parse --short=12 "$tip")${LANEPARENT[$t]:+ on ${LANEPARENT[$t]}}"
done
-git diff --full-index "$acc" "$TESTING_SHA" > "$OUT/fixups/post-merge.patch"
+FIX=$OUT/fixups/post-merge.patch
+git diff --full-index "$acc" "$TESTING_SHA" > "$FIX"
+if [ ! -s "$FIX" ]; then
+ rm -f "$FIX"
+ rmdir "$OUT/fixups" 2>/dev/null || true
+ echo "NOTE no post-merge fixup needed; fixups/post-merge.patch removed if it existed" >&2
+fi
# --- verify
idx=$TMP/index
for t in $order; do
+ chain=($t); p=${LANEPARENT[$t]}
+ while [ -n "$p" ]; do chain=("$p" "${chain[@]}"); p=${LANEPARENT[$p]}; done
GIT_INDEX_FILE=$idx git read-tree "$B"
- for f in "$OUT"/topics/$t/*.patch; do
- [ -e "$f" ] || continue
- case $f in */0000-cover-letter.patch) continue ;; esac
- GIT_INDEX_FILE=$idx git apply --cached "$f" || die "verify: $f does not apply"
+ for u in "${chain[@]}"; do
+ for f in "$OUT"/topics/$u/*.patch; do
+ [ -e "$f" ] || continue
+ case $f in */0000-cover-letter.patch) continue ;; esac
+ GIT_INDEX_FILE=$idx git apply --cached "$f" || die "verify: $f does not apply"
+ done
done
[ "$(GIT_INDEX_FILE=$idx git write-tree)" = "$(git rev-parse "$PFX$t^{tree}")" ] \
|| die "verify: topics/$t patches != $PFX$t"
done
GIT_INDEX_FILE=$idx git read-tree "$acc"
-if [ -s "$OUT/fixups/post-merge.patch" ]; then
- GIT_INDEX_FILE=$idx git apply --cached "$OUT/fixups/post-merge.patch" || die "verify: post-merge.patch does not apply"
+if [ -s "$FIX" ]; then
+ GIT_INDEX_FILE=$idx git apply --cached "$FIX" || die "verify: post-merge.patch does not apply"
fi
[ "$(GIT_INDEX_FILE=$idx git write-tree)" = "$(git rev-parse "$TESTING_SHA^{tree}")" ] || die "verify: post-merge"
-echo "fixup: $(git diff --shortstat "$acc" "$TESTING_SHA" | sed 's/^ //;s/^$/empty/')"
+st=$(git diff --shortstat "$acc" "$TESTING_SHA" | sed 's/^ //')
+echo "fixup: ${st:-none}"
echo "verified; base $(git rev-parse --short=12 "$B") ($(git describe --tags "$B" 2>/dev/null || echo '?')) testing $(git rev-parse --short=12 "$TESTING_SHA") origin/devel $(git rev-parse --short=12 origin/devel 2>/dev/null || echo '?')"
+++ /dev/null
-From 7246e18c809fe0e415153c47ca5b108b8284c1b9 Mon Sep 17 00:00:00 2001
-From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
-Date: Fri, 16 Oct 2026 04:03:07 -0400
-Subject: [PATCH] btrfs-progs: print-tree: print the dev-replace stop time, not
- the start time twice
-To: linux-btrfs@vger.kernel.org
-
-print_dev_replace_item() passed btrfs_dev_replace_time_started() to both
-the "start time" and the "stop time" lines, so dump-tree showed the
-start time as the stop time of a finished or canceled replace.
-
-Assisted-by: Claude:claude-opus-5-5
----
- kernel-shared/print-tree.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c
-index 4b3ad093..c821ee27 100644
---- a/kernel-shared/print-tree.c
-+++ b/kernel-shared/print-tree.c
-@@ -1491,7 +1491,7 @@ static void print_dev_replace_item(struct extent_buffer *eb, struct btrfs_dev_re
- state_str, btrfs_dev_replace_num_write_errors(eb, ptr),
- btrfs_dev_replace_num_uncorrectable_read_errors(eb, ptr));
- print_u64_timespec(btrfs_dev_replace_time_started(eb, ptr), "\t\tstart time ");
-- print_u64_timespec(btrfs_dev_replace_time_started(eb, ptr), "\t\tstop time ");
-+ print_u64_timespec(btrfs_dev_replace_time_stopped(eb, ptr), "\t\tstop time ");
- }
-
- void __btrfs_print_leaf(struct extent_buffer *eb, unsigned int mode)
-
-base-commit: 9d01fb77f46e98047df6767e237718b5ed816558
---
-2.47.3
-
--- /dev/null
+From 41723c4246cace6181c89461ee1143c4849851cb Mon Sep 17 00:00:00 2001
+From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
+Date: Fri, 16 Oct 2026 04:03:07 -0400
+Subject: [PATCH] btrfs-progs: print-tree: print the stop time of a dev-replace
+ item
+To: linux-btrfs@vger.kernel.org
+
+print_dev_replace_item() passed btrfs_dev_replace_time_started() to both
+the "start time" and the "stop time" lines, so dump-tree showed the
+start time as the stop time of a finished or canceled replace.
+
+Fixes: 6ad89f67a9ac ("btrfs-progs: print-tree: add support for dev-replace item")
+Assisted-by: Claude:claude-opus-5-5
+---
+ kernel-shared/print-tree.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c
+index 4b3ad093..c821ee27 100644
+--- a/kernel-shared/print-tree.c
++++ b/kernel-shared/print-tree.c
+@@ -1491,7 +1491,7 @@ static void print_dev_replace_item(struct extent_buffer *eb, struct btrfs_dev_re
+ state_str, btrfs_dev_replace_num_write_errors(eb, ptr),
+ btrfs_dev_replace_num_uncorrectable_read_errors(eb, ptr));
+ print_u64_timespec(btrfs_dev_replace_time_started(eb, ptr), "\t\tstart time ");
+- print_u64_timespec(btrfs_dev_replace_time_started(eb, ptr), "\t\tstop time ");
++ print_u64_timespec(btrfs_dev_replace_time_stopped(eb, ptr), "\t\tstop time ");
+ }
+
+ void __btrfs_print_leaf(struct extent_buffer *eb, unsigned int mode)
+
+base-commit: 9d01fb77f46e98047df6767e237718b5ed816558
+--
+2.47.3
+
| progs in use on 2026-10-04 (before the fix existed; the log does not name the version) | a STARTED item with `start time 1791121231` and `stop time 1791121231`: the same value twice | 2026-10-04 | raid56-wh-harness `forensics/kakra618-lockdep-rmdev-typestore-20261004/alloc-hints-replace-test.log` |
| refs/cand/abortflag-progs/testing 9fed456c, which has this patch as 125a80e1 (diff identical to 7246e18c) | 52 dev_replace item dumps in the replace-abort runs (bhive #30, #31; dhive #119, #120): none with stop == start; `stop time 0` on every STARTED item (running, suspended, crash images); a stop time after the start time on every FINISHED and CANCELED item, e.g. FINISHED `start time 1792177900 (2026-10-16 15:11:40)`, `stop time 1792177921 (2026-10-16 15:12:01)` | 2026-10-16 | raid56-wh-harness `forensics/replace-abort-20261016/{bhive-mn30,dhive-618-119,af2-bhive-mn31,af2-dhive-618-120}/*/item-*.txt` |
+## Lane SHAs
+
+2026-10-30 message rewrite (subject shortened to "btrfs-progs: print-tree: print the stop time of a dev-replace item", added `Fixes: 6ad89f67a9ac`): 7246e18c -> 41723c42, same tree.
+
## Full test suite
Pending: a separate run of the whole btrfs-progs test suite on ahive
-From 08cfeba28ba1ab9b7c2336dd7f0ec906f46404f0 Mon Sep 17 00:00:00 2001
+From 224e9b1c4e197506343508762b01944987c6ab4e Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
-Date: Fri, 30 Oct 2026 09:38:46 -0400
+Date: Fri, 30 Oct 2026 09:48:05 -0400
Subject: [PATCH 0/4] btrfs-progs: inspect logical-resolve: find the file names again
To: linux-btrfs@vger.kernel.org
btrfs-progs: accept hexadecimal and octal numbers in arg_strtou64()
again
btrfs-progs: inspect logical-resolve: find subvolumes under any mount
- of the filesystem
- btrfs-progs: inspect logical-resolve: fail when a reference cannot be
- resolved to a path
+ btrfs-progs: inspect logical-resolve: fail on an unresolvable
+ reference
cmds/inspect.c | 283 +++++++++++++-----
common/parse-utils.c | 13 +-
common/string-utils.c | 5 +-
common/utils.c | 135 +++------
common/utils.h | 3 +-
- .../test.sh | 25 +-
- 7 files changed, 289 insertions(+), 176 deletions(-)
+ .../test.sh | 26 +-
+ 7 files changed, 290 insertions(+), 176 deletions(-)
base-commit: 9d01fb77f46e98047df6767e237718b5ed816558
-From 35045fc77bf9449c247d5146b69ccbbd7697ad8b Mon Sep 17 00:00:00 2001
+From 54f49b278f8f9f5374202b9847cc643b14e8a55b Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Date: Thu, 29 Oct 2026 23:34:26 -0400
Subject: [PATCH 3/4] btrfs-progs: inspect logical-resolve: find subvolumes
- under any mount of the filesystem
+ under any mount
To: linux-btrfs@vger.kernel.org
Since v5.10, logical-resolve looks up a mount point whose mounted path
--- /dev/null
+From 224e9b1c4e197506343508762b01944987c6ab4e Mon Sep 17 00:00:00 2001
+From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
+Date: Thu, 29 Oct 2026 23:34:39 -0400
+Subject: [PATCH 4/4] btrfs-progs: inspect logical-resolve: fail on an
+ unresolvable reference
+To: linux-btrfs@vger.kernel.org
+
+When the subvolume of a reference cannot be opened, logical-resolve
+prints "inode N subvol S could not be accessed: not mounted" to stdout
+and exits with status 0, so a script that reads the paths sees fewer
+paths, or none at all, and no error.
+
+Report it as an error on stderr and exit with status 1 once all the
+other references have been printed.
+
+This changes the output: scripts that parsed the message from stdout
+will no longer see it there.
+
+Update misc-tests/042, which read the message from stdout and relied on
+the exit status 0: accept exit status 1 only together with at least one
+such error, and require the error whenever the status is 1.
+
+Link: https://github.com/kdave/btrfs-progs/issues/400
+Assisted-by: Claude:claude-opus-5-5
+---
+ cmds/inspect.c | 5 ++--
+ .../test.sh | 26 ++++++++++++++++---
+ 2 files changed, 26 insertions(+), 5 deletions(-)
+
+diff --git a/cmds/inspect.c b/cmds/inspect.c
+index 0c61b4d5..8eedba30 100644
+--- a/cmds/inspect.c
++++ b/cmds/inspect.c
+@@ -446,8 +446,9 @@ static int cmd_inspect_logical_resolve(const struct cmd_struct *cmd,
+
+ if (btrfs_subvolid_resolve(fd, name, sizeof(name), root) < 0)
+ snprintf(name, sizeof(name), "<id %llu>", root);
+- printf("inode %llu subvol %s could not be accessed: not mounted\n",
+- inum, name[0] ? name : "<FS_TREE>");
++ error("inode %llu subvol %s could not be accessed: not mounted",
++ inum, name[0] ? name : "<FS_TREE>");
++ ret = -ENOENT;
+ continue;
+ }
+ ret2 = __ino_to_path_fd(inum, path_fd, sl.path);
+diff --git a/tests/misc-tests/042-inspect-internal-logical-resolve/test.sh b/tests/misc-tests/042-inspect-internal-logical-resolve/test.sh
+index 0ef90e93..1e284067 100755
+--- a/tests/misc-tests/042-inspect-internal-logical-resolve/test.sh
++++ b/tests/misc-tests/042-inspect-internal-logical-resolve/test.sh
+@@ -11,22 +11,42 @@ prepare_test_dev
+ check_prereq btrfs
+ check_prereq mkfs.btrfs
+
++# A reference whose subvolume is not reachable from any mount is reported on
++# stderr, and makes logical-resolve exit with status 1 after printing the
++# paths of all the other references
++unreachable_re='^ERROR: inode [0-9]+ subvol .* could not be accessed: not mounted$'
++
+ check_logical_offset_filename()
+ {
+ local offset
++ local output
++ local ret
++ local unreachable=0
+
+ offset="$1"
+
++ output=$(run_mayfail_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal \
++ logical-resolve "$offset" "$TEST_MNT")
++ ret=$?
+ while read file; do
+- if [[ "$file" = *"inode "* ]]; then
++ if [ -z "$file" ]; then
++ continue
++ elif [[ "$file" =~ $unreachable_re ]]; then
+ _log "$file"
++ unreachable=$((unreachable + 1))
+ elif [ ! -f "$file" ]; then
+ _fail "path '$file' file cannot be accessed"
+ else
+ _log "$file"
+ fi
+- done < <(run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal \
+- logical-resolve "$offset" "$TEST_MNT")
++ done <<< "$output"
++
++ if [ "$ret" -ne 0 ] && [ "$unreachable" -eq 0 ]; then
++ _fail "logical-resolve $offset failed with no unreachable references"
++ fi
++ if [ "$ret" -eq 0 ] && [ "$unreachable" -ne 0 ]; then
++ _fail "logical-resolve $offset succeeded with unreachable references"
++ fi
+ }
+
+ run_check_mkfs_test_dev
+--
+2.47.3
+
+++ /dev/null
-From 08cfeba28ba1ab9b7c2336dd7f0ec906f46404f0 Mon Sep 17 00:00:00 2001
-From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
-Date: Thu, 29 Oct 2026 23:34:39 -0400
-Subject: [PATCH 4/4] btrfs-progs: inspect logical-resolve: fail when a
- reference cannot be resolved to a path
-To: linux-btrfs@vger.kernel.org
-
-When the subvolume of a reference cannot be opened, logical-resolve
-prints "inode N subvol S could not be accessed: not mounted" to stdout
-and exits with status 0, so a script that reads the paths sees fewer
-paths, or none at all, and no error.
-
-Report it as an error on stderr and exit with status 1 once all the
-other references have been printed.
-
-This changes the output: scripts that parsed the message from stdout
-will no longer see it there.
-
-Update misc-tests/042, which read the message from stdout and relied on
-the exit status 0: accept exit status 1 only together with at least one
-such error, and require the error whenever the status is 1.
-
-Link: https://github.com/kdave/btrfs-progs/issues/400
-Assisted-by: Claude:claude-opus-5-5
----
- cmds/inspect.c | 5 ++--
- .../test.sh | 25 ++++++++++++++++---
- 2 files changed, 25 insertions(+), 5 deletions(-)
-
-diff --git a/cmds/inspect.c b/cmds/inspect.c
-index 0c61b4d5..8eedba30 100644
---- a/cmds/inspect.c
-+++ b/cmds/inspect.c
-@@ -446,8 +446,9 @@ static int cmd_inspect_logical_resolve(const struct cmd_struct *cmd,
-
- if (btrfs_subvolid_resolve(fd, name, sizeof(name), root) < 0)
- snprintf(name, sizeof(name), "<id %llu>", root);
-- printf("inode %llu subvol %s could not be accessed: not mounted\n",
-- inum, name[0] ? name : "<FS_TREE>");
-+ error("inode %llu subvol %s could not be accessed: not mounted",
-+ inum, name[0] ? name : "<FS_TREE>");
-+ ret = -ENOENT;
- continue;
- }
- ret2 = __ino_to_path_fd(inum, path_fd, sl.path);
-diff --git a/tests/misc-tests/042-inspect-internal-logical-resolve/test.sh b/tests/misc-tests/042-inspect-internal-logical-resolve/test.sh
-index 0ef90e93..dbf580e9 100755
---- a/tests/misc-tests/042-inspect-internal-logical-resolve/test.sh
-+++ b/tests/misc-tests/042-inspect-internal-logical-resolve/test.sh
-@@ -11,22 +11,41 @@ prepare_test_dev
- check_prereq btrfs
- check_prereq mkfs.btrfs
-
-+# A reference whose subvolume is not reachable from any mount is reported on
-+# stderr, and makes logical-resolve exit with status 1 after printing the
-+# paths of all the other references
-+unreachable_re='^ERROR: inode [0-9]+ subvol .* could not be accessed: not mounted$'
-+
- check_logical_offset_filename()
- {
- local offset
-+ local output
-+ local ret
-+ local unreachable=0
-
- offset="$1"
-
-+ output=$(run_mayfail_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal logical-resolve "$offset" "$TEST_MNT")
-+ ret=$?
- while read file; do
-- if [[ "$file" = *"inode "* ]]; then
-+ if [ -z "$file" ]; then
-+ continue
-+ elif [[ "$file" =~ $unreachable_re ]]; then
- _log "$file"
-+ unreachable=$((unreachable + 1))
- elif [ ! -f "$file" ]; then
- _fail "path '$file' file cannot be accessed"
- else
- _log "$file"
- fi
-- done < <(run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal \
-- logical-resolve "$offset" "$TEST_MNT")
-+ done <<< "$output"
-+
-+ if [ "$ret" -ne 0 ] && [ "$unreachable" -eq 0 ]; then
-+ _fail "logical-resolve $offset failed with no unreachable references"
-+ fi
-+ if [ "$ret" -eq 0 ] && [ "$unreachable" -ne 0 ]; then
-+ _fail "logical-resolve $offset succeeded with unreachable references"
-+ fi
- }
-
- run_check_mkfs_test_dev
---
-2.47.3
-
| `logical-resolve-repro.sh` (matrix: layouts top, top with ".", top with a subvolume directory argument, hex, both, sub, sub with ".", priv, 2opt, wrongfs, wrongfs with a bind mount first; plain, reflinked, zstd-compressed and nested-subvolume extents, at the extent start and mid-extent, with and without -o) | every reference resolves to the right file under the right filesystem; paths relative to the argument; hex addresses | 1-4 | 99 cases per build. v6.14: 28/99 fully resolved; stock v7.1: 28/99. Topic: 87/99; the other 12 are the `sub` layout's references that are really unreachable (root 5 and snap1 with only subvol=/sv1 mounted): reported as `ERROR: ... could not be accessed: not mounted` on stderr, rc 1. wrongfs: stock prints `/mnt/wh/lr-mnt3/WRONG-FS-B-f1` (another filesystem's file), topic resolves fs A through both routes. hex: stock `ERROR: 0xd00000 is not a valid numeric value`, topic 2/2 | 2026-10-30 | v6.14, v7.1, testing 25b77be8 | 09b7609 | `run-ahive-testing-25b77be8.txt`, `run-ahive-mn759c6b78edf4.txt` |
| the same with patches 1-3 only | | 1-3 | identical, except that the unreachable references printed to stdout with rc 0 | 2026-10-30 | devel + 0001-0003 | b863822 | README |
| misc-tests `042-inspect-internal-logical-resolve` (updated by patch 4) | paths, and unreachable references with rc 1 | 4 | PASS: 8 path lines, 4 unreachable references (@/snap1, @/vol1/snapshot1) with rc 1 on 4 offsets | 2026-10-30 | testing 25b77be8 | 09b7609 | `misc-042-results-testing-25b77be8.txt` |
+| same, after the 2026-10-30 rewrite (line continuation restored) | as above | 4 | PASS, rc 0: 8 path lines, 4 unreachable references with rc 1 on 4 offsets, as before | 2026-10-30 | testing 14a5fdb4 (ahive `7.3.0-rc7+ #7`, build in /mnt/linux/progs-msg042, removed afterwards) | e18a4ed | `misc-042-results-testing-14a5fdb4.txt` |
| same, control | the new 042 against the stock binary | none | FAIL as expected: "inode 257 subvol @/snap1 could not be accessed" read as a path | 2026-10-30 | stock v7.1 as TOP/btrfs | 09b7609 | same file |
## Existing tests
liburing, which ahive did not have); `make all` and `TEST=...
./misc-tests.sh` were used. None of the tests above need fsstress.
+## Lane SHAs
+
+2026-10-30 message rewrite (subjects of patches 3 and 4 shortened) and a code change in patch 4: the misc-tests/042 line continuation (collapsed into tabs mid-line) is restored. 35045fc7 -> 54f49b27 (same tree), 08cfeba2 -> 224e9b1c (only test.sh differs, whitespace); 4bd84e5a and 09299b6d unchanged. testing 3bc81a49 -> 14a5fdb4 (the same difference).
+
## Full test suite
Pending: a separate run of the whole btrfs-progs test suite on ahive
-From ae91bb721fd502788b0915fb4803f60f68c6c407 Mon Sep 17 00:00:00 2001
+From 4e99165436504194cdc0ff082fc5e02021c5b724 Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Date: Tue, 13 Oct 2026 03:18:57 -0400
Subject: [PATCH] btrfs-progs: do not write a NULL remap root during mkfs
fs_info->remap_root->node unconditionally: mkfs -O remap-tree segfaulted.
Leave the superblock remap root fields alone until the node exists.
+Fixes: 9f887733b34e ("btrfs-progs: write remap root details to superblock")
Assisted-by: Claude:claude-opus-5-5
---
kernel-shared/disk-io.c | 3 ++-
On 6.18 the test SKIPs: that kernel cannot mount a remap-tree
filesystem (expected).
+## Lane SHAs
+
+2026-10-30 message rewrite (added `Fixes: 9f887733b34e`, trailing blank lines removed): ae91bb72 -> 4e991654, same tree.
+
## Full test suite
Pending: a separate run of the whole btrfs-progs test suite on ahive
-From 2ee0ef38412e27cd0c522f48751ca40061a3d19e Mon Sep 17 00:00:00 2001
+From 52210d21fbf4e86be51b8119a4e2842b2063b88d Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Date: Fri, 16 Oct 2026 13:03:37 -0400
Subject: [PATCH] btrfs-progs: replace: add --abort-on-uncorrectable
say so when the replace runs in the foreground; an aborted replace fails
with EIO. dump-tree prints the flag in the dev_replace item's mode.
+The kernel side is the patch "btrfs: dev-replace: optionally abort on
+uncorrectable read errors" (kernel replace-fixes series), which defines
+the flag and keeps it in the dev_replace item.
+
Assisted-by: Claude:claude-opus-5-5
---
Documentation/btrfs-replace.rst | 12 ++++++++++++
| replace-status-test, replace-uncorrectable-test, replace-cancel-persist-test, each with the system v6.14 and with the candidate progs | identical to the replace-status "after" results, except the replace-cancel-persist cancel line (the test's own change a141ee1: `start -B` run as a shell job); 12 cancel runs per rig, umount rc 0 every time | 2026-10-16 | `replace-abort-20261016/` "Regressions" |
| scrub-uncorrectable-rc-test | identical | 2026-10-16 | same |
+## Lane SHAs
+
+2026-10-30 message rewrite (a sentence naming the kernel patch it needs): 2ee0ef38 -> 52210d21, same tree.
+
## Full test suite
Pending: a separate run of the whole btrfs-progs test suite on ahive
-From 02e0c99bb36dc27b9d652b69ba4192794ec0c55e Mon Sep 17 00:00:00 2001
+From c6bdae69281400698579562f59ef003b323cf7f6 Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
-Date: Fri, 30 Oct 2026 09:38:46 -0400
+Date: Fri, 30 Oct 2026 09:48:05 -0400
Subject: [PATCH 0/2] btrfs-progs: scrub: leave the device limits alone without --limit
To: linux-btrfs@vger.kernel.org
slower than with v6.13 to v7.1. "--limit 0" still runs unthrottled for
that scrub and restores the old limits afterwards.
-Patch 2 depends on patch 1. The series is independent of the other
-scrub series ("btrfs-progs: scrub: progress socket fixes"), but
-conflicts with it in scrub_start() when both are applied: keep both
-hunks in the parent's branch after the fork, the limit_changed reset
-first.
+Patch 2 depends on patch 1. The series "btrfs-progs: scrub: progress
+socket fixes" is based on this one.
Link: https://github.com/kdave/btrfs-progs/issues/1165
-From 7e8ddeba7b358f6eb13e83c3c57cbe5959fd2ead Mon Sep 17 00:00:00 2001
+From 851f815395ec0b7274396a71a6c26ea100232a04 Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Date: Thu, 29 Oct 2026 23:18:07 -0400
Subject: [PATCH 1/2] btrfs-progs: scrub: only change the device limits when
Read, write and restore the limits only when --limit is given. Without
it, the scrub runs with whatever limits the devices already have.
+Link: https://github.com/kdave/btrfs-progs/issues/1165
Fixes: 7c1c88e41668 ("btrfs-progs: scrub: add the new --limit option to set the throughput limit at runtime")
Assisted-by: Claude:claude-opus-5-5
---
-From 02e0c99bb36dc27b9d652b69ba4192794ec0c55e Mon Sep 17 00:00:00 2001
+From c6bdae69281400698579562f59ef003b323cf7f6 Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Date: Fri, 30 Oct 2026 00:03:11 -0400
Subject: [PATCH 2/2] btrfs-progs: scrub: restore the device limits on every
|---|---|---|---|---|---|
| cli-tests `024-scrub-limit` | `scrub limit` and `--limit` command line handling | PASS (RC=0) on testing f015cf72, 4de739d4 and 3bc81a49 | 2026-10-30 | as listed | `build-and-cli.txt`, README |
+## Lane SHAs
+
+2026-10-30 message rewrite (p1: `Link:` for Issue #1165; trailing blank lines removed): p1 7e8ddeba -> 851f8153, p2 02e0c99b -> c6bdae69, same trees. testing is now 14a5fdb4; its cmds/scrub.c is the same as 3bc81a49's.
+
## Full test suite
Pending: a separate run of the whole btrfs-progs test suite on ahive
-From 0d535ece7a9a10a11abadf6e81e9eabbb3ad244e Mon Sep 17 00:00:00 2001
+From 37cc6ecb63f75d08913183387116f1ea7ecc05e0 Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
-Date: Fri, 30 Oct 2026 09:38:46 -0400
+Date: Fri, 30 Oct 2026 09:48:05 -0400
Subject: [PATCH 0/2] btrfs-progs: scrub: progress socket fixes
To: linux-btrfs@vger.kernel.org
would reach background scrubs too, and kill them the way it kills
foreground ones today.
-The series applies to devel on its own and its socket behaviour does
-not depend on anything else. But a "scrub start -f" probe on devel
-still zeroes the running scrub's device limits and never restores them;
-that is fixed by the series "btrfs-progs: scrub: leave the device limits
-alone without --limit", which this one conflicts with in scrub_start()
-when both are applied (keep both hunks in the parent's branch after the
-fork, the limit_changed reset first). Applying that series first is
-recommended.
+This series is based on "btrfs-progs: scrub: leave the device limits
+alone without --limit", which has to be applied first. Both change the
+parent's branch after the fork in scrub_start(), and patch 2 adds the
+socket close after that series' reset of the parent's limit_changed
+flags. The socket fixes themselves do not depend on it, but without it
+a "scrub start -f" probe still zeroes the running scrub's device limits
+and never restores them.
Not changed: the "scrub already running" exit still returns status 0.
Changing it could break scripts that start a scrub unconditionally.
base-commit: 9d01fb77f46e98047df6767e237718b5ed816558
+prerequisite-patch-id: 6cc259db3648c6e43526fe45ef5986a0e2005d77
+prerequisite-patch-id: d0af9738a095e6bf5475a9fd0cd2468ed25e4cb8
--
2.47.3
-From 8c8475d70f3e78ae0c1a974e664a8a020fdddbfe Mon Sep 17 00:00:00 2001
+From 305e8f89779e5c4be0f74d4730fe995419829b89 Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Date: Fri, 30 Oct 2026 01:04:01 -0400
Subject: [PATCH 1/2] btrfs-progs: scrub: survive a progress client that closes
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/cmds/scrub.c b/cmds/scrub.c
-index cb02d921..69ad48c0 100644
+index 2b6df6f5..1843856b 100644
--- a/cmds/scrub.c
+++ b/cmds/scrub.c
-@@ -1017,6 +1017,18 @@ static void *scrub_progress_cycle(void *ctx)
+@@ -1019,6 +1019,18 @@ static void *scrub_progress_cycle(void *ctx)
};
struct sockaddr_un peer;
socklen_t peer_size = sizeof(peer);
perr = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old);
if (perr)
-@@ -1108,13 +1120,13 @@ static void *scrub_progress_cycle(void *ctx)
+@@ -1110,13 +1122,13 @@ static void *scrub_progress_cycle(void *ctx)
ret = -errno;
goto out;
}
-From 0d535ece7a9a10a11abadf6e81e9eabbb3ad244e Mon Sep 17 00:00:00 2001
+From 37cc6ecb63f75d08913183387116f1ea7ecc05e0 Mon Sep 17 00:00:00 2001
From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Date: Fri, 30 Oct 2026 01:04:01 -0400
Subject: [PATCH 2/2] btrfs-progs: scrub: keep the progress socket of a
1 file changed, 11 insertions(+)
diff --git a/cmds/scrub.c b/cmds/scrub.c
-index 69ad48c0..1d006629 100644
+index 1843856b..c286b20d 100644
--- a/cmds/scrub.c
+++ b/cmds/scrub.c
-@@ -1531,6 +1531,17 @@ static int scrub_start(const struct cmd_struct *cmd, int argc, char **argv,
-
- if (pid) {
- int stat;
+@@ -1567,6 +1567,17 @@ static int scrub_start(const struct cmd_struct *cmd, int argc, char **argv,
+ /* The child scrubs and restores the old limits. */
+ for (i = 0; i < fi_args.num_devices; ++i)
+ sp[i].limit_changed = false;
+
+ /*
+ * The child serves the progress socket and removes it
| `scrub-limit-test.sh` | the limit arms (regression) | PASS, 0 / control 6 | 2026-10-30 | 4de739d4 | `scrub-limit-test.4de739d4.out` |
| cli-tests `024-scrub-limit` | | PASS (RC=0) on 4de739d4 and 3bc81a49 | 2026-10-30 | | README |
+## Lane SHAs
+
+2026-10-30 the topic was stacked on scrub-limit-only-with-option (c6bdae69): 8c8475d7 -> 305e8f89 (same diff), 0d535ece -> 37cc6ecb (same added lines). Patch 2 now contains the combination with scrub-limit p2 that the octopus resolved before (the limit_changed reset, then the socket close). The stacked tip's cmds/scrub.c is the same as testing 3bc81a49's, which the tests above ran on, and as 4de739d4's (a4d31e74 + this topic). The "topic only" row tested devel + the unstacked commits, which no longer exist as a branch.
+
## Full test suite
Pending: a separate run of the whole btrfs-progs test suite on ahive