]> git.hungrycats.org Git - btrfs-progs/commitdiff
btrfs-progs topic series: logical-resolve-fixes -z wording (0/5) upstream
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 31 Oct 2026 03:05:17 +0000 (23:05 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 31 Oct 2026 03:05:17 +0000 (23:05 -0400)
The resolve commands never escaped their output, so patch 5 no longer
sets -z against escaping: it ends each path (each -P line) with NUL
instead of a newline, for names that contain newlines.  Text only
(usage, rst, commit message, a 074 comment); topic c9ea03d8, testing
71ea1475.  Cover 0/5 reworded the same way; TESTING.md and README
updated with the new hashes and the ahive results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README.md
topics/dump-tree-replace-stop-time/TESTING.md
topics/logical-resolve-fixes/0000-cover-letter.patch
topics/logical-resolve-fixes/0005-btrfs-progs-inspect-add-z-to-logical-resolve-and-ino.patch
topics/logical-resolve-fixes/TESTING.md
topics/mkfs-remap-tree/TESTING.md
topics/replace-abort-uncorrectable/TESTING.md
topics/scrub-limit-only-with-option/TESTING.md
topics/scrub-progress-socket/TESTING.md

index 6e2963eb60e7f6eddaff24e200c53f5f4aa768f1..b53161390965a9da14eec4902ced9e36dbdbd29e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ side (`~/share/linux-upstream`, branch `upstream` of `~/share/linux`).
 | | |
 |---|---|
 | base of every series | `9d01fb77f46e` (`v7.1-102-g9d01fb77`), upstream btrfs-progs `devel` as of 2026-10-29: `testing^1` |
-| integration branch | `testing` `d541f7768952` (octopus of the base and the 6 topics; `scrub-progress-socket` contains `scrub-limit-only-with-option`, which is also a parent, as on the kernel lanes) |
+| integration branch | `testing` `71ea14752adb` (octopus of the base and the 6 topics; `scrub-progress-socket` contains `scrub-limit-only-with-option`, which is also a parent, as on the kernel lanes) |
 | 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,
index 050829b78239ec4bdfa4edd7c62947c140e54cca..ec04fadf814c7e079204dc4261b9bc9e891205e5 100644 (file)
@@ -29,7 +29,7 @@ Wed Oct 28 21:00:00 EDT 2026` (KASAN, PROVE_LOCKING, BTRFS_DEBUG,
 BTRFS_ASSERT).  Evidence: raid56-wh-harness
 `forensics/progs-testsuite-20261030/SUMMARY.md` (harness b243013).
 
-3bc81a49 differs from the current `testing` d541f776 in five ways,
+3bc81a49 differs from the current `testing` 71ea1475 in five ways,
 all in logical-resolve-fixes: it still had the arg_strtou64() hex patch
 that was since dropped, and the collapsed misc-tests/042 line that was
 since restored; and it predates the fix for a path argument inside a
index 81594b688ab9010e37d3b11a7988f9bebe376b8e..3926c465e6df2c8801fc5adb2da11ca8f3faf79d 100644 (file)
@@ -1,6 +1,6 @@
-From 85ca1f91a962d1d538d764ee25fcf3d144b2f883 Mon Sep 17 00:00:00 2001
+From c9ea03d86d7c8f16c214247df12e1a9ef9b3eeb8 Mon Sep 17 00:00:00 2001
 From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
-Date: Fri, 30 Oct 2026 20:38:09 -0400
+Date: Fri, 30 Oct 2026 22:59:36 -0400
 Subject: [PATCH 0/5] btrfs-progs: inspect logical-resolve: find the file names again
 To: linux-btrfs@vger.kernel.org
 
@@ -93,10 +93,10 @@ from e31679c1 already decodes them), and updates 074 for the new message
 and exit status.
 
 Patch 5 is a feature: -z (--zero) for both commands ends each path (and
-each -P line) with a NUL character instead of a newline, without any
-escaping, so that file names with newlines can be parsed.  No progs
-command has such an option yet; the name follows coreutils' realpath,
-readlink, dirname and basename.  Tests in 042 and 074.
+each -P line) with a NUL character instead of a newline, so that file
+names with newlines can be parsed.  No progs command has such an option
+yet; the name follows coreutils' realpath, readlink, dirname and
+basename.  Tests in 042 and 074.
 
 User-visible changes:
 - Patch 2: paths are printed relative to the path argument when the
@@ -130,13 +130,13 @@ Zygo Blaxell (5):
     reference
   btrfs-progs: inspect: add -z to logical-resolve and inode-resolve
 
- Documentation/btrfs-inspect-internal.rst      |  13 +-
+ Documentation/btrfs-inspect-internal.rst      |  11 +-
  cmds/inspect.c                                | 599 +++++++++++++++---
  common/utils.c                                | 135 +---
  common/utils.h                                |   3 +-
  .../test.sh                                   | 176 ++++-
  .../test.sh                                   | 120 ++++
- 6 files changed, 846 insertions(+), 200 deletions(-)
+ 6 files changed, 844 insertions(+), 200 deletions(-)
  create mode 100755 tests/misc-tests/074-inspect-internal-inode-resolve/test.sh
 
 
index 197dc0747dab462a3625d44b976a37467b260ff6..74087a7533cfa5502372614a38c9f2b10c3401f6 100644 (file)
@@ -1,4 +1,4 @@
-From 85ca1f91a962d1d538d764ee25fcf3d144b2f883 Mon Sep 17 00:00:00 2001
+From c9ea03d86d7c8f16c214247df12e1a9ef9b3eeb8 Mon Sep 17 00:00:00 2001
 From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
 Date: Fri, 30 Oct 2026 20:26:49 -0400
 Subject: [PATCH 5/5] btrfs-progs: inspect: add -z to logical-resolve and
@@ -8,9 +8,8 @@ To: linux-btrfs@vger.kernel.org
 The paths that logical-resolve and inode-resolve print are file names,
 which may contain newlines, so a script cannot split the output into
 paths reliably.  Add -z (--zero): end each path with a NUL character
-instead of a newline, and print it as it is, without any escaping or
-quoting.  With logical-resolve -P each inode line ends with NUL instead.
-Errors still go to stderr as text.
+instead of a newline.  With logical-resolve -P each inode line ends
+with NUL instead.  Errors still go to stderr.
 
 No btrfs-progs command has such an option yet.  The name follows the
 coreutils commands that print file names, such as realpath, readlink,
@@ -25,14 +24,14 @@ space in its name).
 Link: https://github.com/kdave/btrfs-progs/issues/400
 Assisted-by: Claude:claude-opus-5-5
 ---
- Documentation/btrfs-inspect-internal.rst      | 13 ++++++-
+ Documentation/btrfs-inspect-internal.rst      | 11 +++++-
  cmds/inspect.c                                | 39 +++++++++++++++----
  .../test.sh                                   | 30 ++++++++++++++
  .../test.sh                                   | 27 +++++++++++++
- 4 files changed, 99 insertions(+), 10 deletions(-)
+ 4 files changed, 97 insertions(+), 10 deletions(-)
 
 diff --git a/Documentation/btrfs-inspect-internal.rst b/Documentation/btrfs-inspect-internal.rst
-index e86135ff..f52e427c 100644
+index e86135ff..fceab9b1 100644
 --- a/Documentation/btrfs-inspect-internal.rst
 +++ b/Documentation/btrfs-inspect-internal.rst
 @@ -137,7 +137,7 @@ dump-tree [options] <device> [device...]
@@ -44,34 +43,32 @@ index e86135ff..f52e427c 100644
          (needs root privileges)
  
          resolve paths to all files with given inode number *ino* in a given subvolume
-@@ -147,8 +147,12 @@ inode-resolve [-v] <ino> <path>
+@@ -147,8 +147,11 @@ inode-resolve [-v] <ino> <path>
  
          -v
                  (deprecated) alias for global *-v* option
 +        -z|--zero
-+                end each path with a NUL character instead of a newline, for paths that
-+                may contain newlines.  Paths are printed as they are, without any escaping
-+                or quoting.  Errors still go to standard error as text.
++                end each path with a NUL character instead of a newline, for names that
++                contain newlines.  Errors still go to standard error.
  
 -logical-resolve [-Pvo] [-s <bufsize>] <logical> <path>
 +logical-resolve [-Pvoz] [-s <bufsize>] <logical> <path>
          (needs root privileges)
  
          resolve paths to all files at given *logical* address in the linear filesystem space
-@@ -168,6 +172,11 @@ logical-resolve [-Pvo] [-s <bufsize>] <logical> <path>
+@@ -168,6 +171,10 @@ logical-resolve [-Pvo] [-s <bufsize>] <logical> <path>
                  (added in 4.15).
          -v
                  (deprecated) alias for global *-v* option
 +        -z|--zero
 +                end each line of output (each path, or each inode with *-P*) with a NUL
-+                character instead of a newline, for paths that may contain newlines.  Paths
-+                are printed as they are, without any escaping or quoting.  Errors still go
-+                to standard error as text.
++                character instead of a newline, for names that contain newlines.  Errors
++                still go to standard error.
  
  list-chunks [options] <path>
          (needs root privileges)
 diff --git a/cmds/inspect.c b/cmds/inspect.c
-index e1ad1579..53532b90 100644
+index e1ad1579..88e37202 100644
 --- a/cmds/inspect.c
 +++ b/cmds/inspect.c
 @@ -94,12 +94,15 @@ static const char *ino_path(const char *pathbuf, int i)
@@ -102,7 +99,7 @@ index e1ad1579..53532b90 100644
        "",
        OPTLINE("-v", "deprecated, alias for global -v option"),
 +      OPTLINE("-z, --zero", "end each path with a NUL character instead of a newline, "
-+              "without any escaping"),
++              "for names that contain newlines"),
        HELPINFO_INSERT_GLOBALS,
        HELPINFO_INSERT_VERBOSE,
        NULL
@@ -144,7 +141,7 @@ index e1ad1579..53532b90 100644
                "v1 ioctl. Sizes over 64k will use the v2 ioctl (kernel 4.15+)"),
        OPTLINE("-v", "deprecated, alias for global -v option"),
 +      OPTLINE("-z, --zero", "end each line of output (path, or inode with -P) with a NUL "
-+              "character instead of a newline, without any escaping"),
++              "character instead of a newline, for names that contain newlines"),
        HELPINFO_INSERT_GLOBALS,
        HELPINFO_INSERT_VERBOSE,
        NULL
@@ -232,7 +229,7 @@ index 36987b4b..1823038c 100755
  run_check $SUDO_HELPER mount -o subvol=/@/vol1/bdir/sub/subvol2 "$TEST_DEV" "mnt8 $odd"
  for offset in $file6offsets; do
 diff --git a/tests/misc-tests/074-inspect-internal-inode-resolve/test.sh b/tests/misc-tests/074-inspect-internal-inode-resolve/test.sh
-index 0e46e4b8..5aee3f62 100755
+index 0e46e4b8..c70a1b3c 100755
 --- a/tests/misc-tests/074-inspect-internal-inode-resolve/test.sh
 +++ b/tests/misc-tests/074-inspect-internal-inode-resolve/test.sh
 @@ -50,6 +50,24 @@ check_inode_resolve()
@@ -264,7 +261,7 @@ index 0e46e4b8..5aee3f62 100755
  check_inode_resolve "$ino" "$TEST_MNT/idir/sub" 0 "$TEST_MNT/idir/sub/file" \
        "$TEST_MNT/ldir/link" "$TEST_MNT/link"
  
-+# With -z, names with a newline and a space are printed as they are
++# With -z, each path ends with NUL, also for a name with a newline and a space
 +name=$'new\nline and space'
 +run_check $SUDO_HELPER ln "$TEST_MNT/idir/sub/file" "$TEST_MNT/ldir/$name"
 +check_inode_resolve_zero "$ino" "$TEST_MNT" "$TEST_MNT/idir/sub/file" \
index a75d440fcebbb3123630ba82551edfbb68585118..107af63fec3aa1a3caec4589f15ba29a302a1ed4 100644 (file)
@@ -9,7 +9,7 @@ Five patches on devel 9d01fb77 (btrfs-progs Issue #400):
 4. a4893e1e unreachable reference or path = error (with the
    misc-tests/042 update, including its bind mount and escaped-name
    cases, and the 074 update);
-5. 85ca1f91 -z/--zero NUL-terminated output for both commands (feature).
+5. c9ea03d8 -z/--zero NUL-terminated output for both commands (feature).
 
 Rows older than 2026-10-30 "bind2" ran earlier versions of patches 2-4
 (see Lane SHAs); their results are kept for the history.
@@ -73,6 +73,7 @@ these tests pass decimal numbers):
 | misc 042, 024, 013, 040, 043, 055, cli 008, with patch 3 | PASS | 2026-10-30 | topic da97c420, testing 14c065a7 | `progs-tests-ahive-{topic-da97c420,testing-14c065a7}.txt` |
 | misc 042, 074, 024, 013, 040, 043, 055, cli 008 ("bind2") | PASS | 2026-10-30 | topic bed8b5eb, testing a32d9351 | `bind2/progs-tests-ahive-bisect-and-testing.txt` |
 | same ("esc") | PASS | 2026-10-31 | topic 85ca1f91, testing d541f776 | `esc/progs-tests-ahive-*.txt` |
+| same ("z", patch 5 text only) | PASS | 2026-10-31 | topic c9ea03d8, testing 71ea1475 | `z/progs-tests-ahive-c9ea03d8-71ea1475.txt` |
 
 `make testsuite` was not built on ahive at the time (fsstress needs
 liburing, which ahive did not have); `make all` and `TEST=...
@@ -80,6 +81,12 @@ liburing, which ahive did not have); `make all` and `TEST=...
 
 ## Lane SHAs
 
+- 2026-10-31 "z" (Zygo: the resolve commands never escaped their output,
+  so -z is described only as ending each path with NUL instead of a
+  newline): patch 5 usage strings, rst, commit message and the 074
+  comment reworded, no code change; 85ca1f91 -> c9ea03d8 (author,
+  committer, dates kept).  testing d541f776 -> 71ea1475, same parents;
+  tree = oracle = real merge.  Backups refs/backup/progs-20261031-z/.
 - 2026-10-31 "esc" (Zygo: unescape mount points; add -z/-0): the
   mountinfo parser already decodes octal escapes (read_path(), from
   e31679c1), so no code change; escaped-name cases added to 042 in patch
@@ -141,7 +148,7 @@ Wed Oct 28 21:00:00 EDT 2026` (KASAN, PROVE_LOCKING, BTRFS_DEBUG,
 BTRFS_ASSERT).  Evidence: raid56-wh-harness
 `forensics/progs-testsuite-20261030/SUMMARY.md` (harness b243013).
 
-3bc81a49 differs from the current `testing` d541f776 in five ways,
+3bc81a49 differs from the current `testing` 71ea1475 in five ways,
 all in logical-resolve-fixes: it still had the arg_strtou64() hex patch
 that was since dropped, and the collapsed misc-tests/042 line that was
 since restored; and it predates the fix for a path argument inside a
index f41ecd9f5db46dfbc5e76eb86a23c2498878947b..8afdaaf67d555027de4e6309cc036ff12988d839 100644 (file)
@@ -41,7 +41,7 @@ Wed Oct 28 21:00:00 EDT 2026` (KASAN, PROVE_LOCKING, BTRFS_DEBUG,
 BTRFS_ASSERT).  Evidence: raid56-wh-harness
 `forensics/progs-testsuite-20261030/SUMMARY.md` (harness b243013).
 
-3bc81a49 differs from the current `testing` d541f776 in five ways,
+3bc81a49 differs from the current `testing` 71ea1475 in five ways,
 all in logical-resolve-fixes: it still had the arg_strtou64() hex patch
 that was since dropped, and the collapsed misc-tests/042 line that was
 since restored; and it predates the fix for a path argument inside a
index 16812c3ee0a6f68b82d3faddd71422ea99eaa527..b2399a293fca27f0f0f2cd6f3cf2174d8ef6d076 100644 (file)
@@ -69,7 +69,7 @@ Wed Oct 28 21:00:00 EDT 2026` (KASAN, PROVE_LOCKING, BTRFS_DEBUG,
 BTRFS_ASSERT).  Evidence: raid56-wh-harness
 `forensics/progs-testsuite-20261030/SUMMARY.md` (harness b243013).
 
-3bc81a49 differs from the current `testing` d541f776 in five ways,
+3bc81a49 differs from the current `testing` 71ea1475 in five ways,
 all in logical-resolve-fixes: it still had the arg_strtou64() hex patch
 that was since dropped, and the collapsed misc-tests/042 line that was
 since restored; and it predates the fix for a path argument inside a
index ef2370dfda1073f0ef2839d7793fe913910b0ae5..5a9561f9e982cd3106a9796ffcd733aeda811626 100644 (file)
@@ -65,7 +65,7 @@ Wed Oct 28 21:00:00 EDT 2026` (KASAN, PROVE_LOCKING, BTRFS_DEBUG,
 BTRFS_ASSERT).  Evidence: raid56-wh-harness
 `forensics/progs-testsuite-20261030/SUMMARY.md` (harness b243013).
 
-3bc81a49 differs from the current `testing` d541f776 in five ways,
+3bc81a49 differs from the current `testing` 71ea1475 in five ways,
 all in logical-resolve-fixes: it still had the arg_strtou64() hex patch
 that was since dropped, and the collapsed misc-tests/042 line that was
 since restored; and it predates the fix for a path argument inside a
index 71cb213d64da571b134086dd55a93d802974e5a7..29b12a0669f24c539b9da703816d129170f3e099 100644 (file)
@@ -53,7 +53,7 @@ Wed Oct 28 21:00:00 EDT 2026` (KASAN, PROVE_LOCKING, BTRFS_DEBUG,
 BTRFS_ASSERT).  Evidence: raid56-wh-harness
 `forensics/progs-testsuite-20261030/SUMMARY.md` (harness b243013).
 
-3bc81a49 differs from the current `testing` d541f776 in five ways,
+3bc81a49 differs from the current `testing` 71ea1475 in five ways,
 all in logical-resolve-fixes: it still had the arg_strtou64() hex patch
 that was since dropped, and the collapsed misc-tests/042 line that was
 since restored; and it predates the fix for a path argument inside a