]> git.hungrycats.org Git - btrfs-progs/commitdiff
btrfs-progs topic series: drop the hex fix, full test suite results
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 30 Oct 2026 14:26:09 +0000 (10:26 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 30 Oct 2026 14:26:09 +0000 (10:26 -0400)
Zygo dropped "btrfs-progs: accept hexadecimal and octal numbers in
arg_strtou64() again" from logical-resolve-fixes (no complaints in
years; decimal or $((0x...)) works).  The logical-resolve cover is now
0/3: defect 6 is left out on purpose, with the workaround, and the
octal note is gone; its TESTING.md has the decimal-only reruns (misc
042 PASS, repro 86/98 with the other 12 really unreachable) and the
lane SHA map.  README updated.

Every TESTING.md gets the full test suite results (testing 3bc81a49 on
ahive, harness b243013: 0 failures, environment-only first-pass failures
fixed, not-run tests explained; 3bc81a49 still had the hex patch and the
collapsed 042 line).

Exported from testing 4ba66afacd77 (devel 9d01fb77f46e):
mkfs-remap-tree 4e9916543650 (1), dump-tree-replace-stop-time
41723c4246ca (1), replace-abort-uncorrectable 52210d21fbf4 (1),
logical-resolve-fixes cb9e0be5cb68 (3), scrub-limit-only-with-option
c6bdae692814 (2), scrub-progress-socket 37cc6ecb63f7 (2, on
scrub-limit-only-with-option).  Verified: patches rebuild every topic
tree; the leaf topics merged give testing's tree with no fixup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 files changed:
README.md
topics/dump-tree-replace-stop-time/TESTING.md
topics/logical-resolve-fixes/0000-cover-letter.patch
topics/logical-resolve-fixes/0001-btrfs-progs-utils-parse-any-number-of-optional-field.patch
topics/logical-resolve-fixes/0002-btrfs-progs-accept-hexadecimal-and-octal-numbers-in-.patch [deleted file]
topics/logical-resolve-fixes/0002-btrfs-progs-inspect-logical-resolve-find-subvolumes-.patch [new file with mode: 0644]
topics/logical-resolve-fixes/0003-btrfs-progs-inspect-logical-resolve-fail-on-an-unres.patch [new file with mode: 0644]
topics/logical-resolve-fixes/0003-btrfs-progs-inspect-logical-resolve-find-subvolumes-.patch [deleted file]
topics/logical-resolve-fixes/0004-btrfs-progs-inspect-logical-resolve-fail-on-an-unres.patch [deleted file]
topics/logical-resolve-fixes/TESTING.md
topics/mkfs-remap-tree/TESTING.md
topics/replace-abort-uncorrectable/TESTING.md
topics/scrub-limit-only-with-option/0000-cover-letter.patch
topics/scrub-limit-only-with-option/TESTING.md
topics/scrub-progress-socket/0000-cover-letter.patch
topics/scrub-progress-socket/TESTING.md

index 0999dd28ab66cb01e8334811400d8416963fea6a..c0aafa82208abc430d30ab60fa469a50b9b1be22 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` `14a5fdb4b135` (octopus of the base and 5 topic tips; `scrub-progress-socket` contains `scrub-limit-only-with-option`) |
+| integration branch | `testing` `4ba66afacd77` (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,
@@ -72,7 +72,7 @@ base.
 | `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 |
+| `logical-resolve-fixes` | 3 | | Zygo | Issue #400; patch 3 changes the exit status and moves a message to stderr, and updates misc-tests/042; hex addresses (defect 6) left out on purpose |
 | `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 |
 
index d419d2aa3f5b9b17032e461976c8450ae5e1b1d6..e03cbe878843ebe84b531aac4103e6f8b2ff4f19 100644 (file)
@@ -21,9 +21,44 @@ the dump-tree output that other tests record:
 
 ## Full test suite
 
-Pending: a separate run of the whole btrfs-progs test suite on ahive
-(testing 3bc81a49) is in progress; results will be in raid56-wh-harness
-`forensics/progs-testsuite-20261030/`.
+The whole btrfs-progs test suite ran on `testing` 3bc81a49 (all six
+topics; built `--enable-experimental --disable-documentation`, every other
+feature on), with origin/devel 9d01fb77 built the same way as the
+control, on ahive's lane debug kernel `7.3.0-rc7+ #7 SMP PREEMPT_DYNAMIC
+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` 4ba66afa in two ways: it
+still had the arg_strtou64() hex patch that was dropped from
+logical-resolve-fixes, and the collapsed misc-tests/042 line that was
+since restored.
+
+| suite | pass | not run | fail |
+|---|---|---|---|
+| fsck | 73 | 0 | 0 |
+| fsck-lowmem | 73 | 0 | 0 |
+| mkfs | 39 | 8 | 0 |
+| misc | 70 | 3 | 0 |
+| cli | 24 | 0 | 0 |
+| convert | 20 | 7 | 0 |
+| fuzz | 10 | 1 | 0 |
+| libbtrfsutil | 38 unit tests OK | 0 | 0 |
+
+- Three tests failed on the first pass for environment reasons:
+  misc/056-subvolume-list-uuid and convert/021-uuid-fsid lacked
+  `uuidparse` / `uuidgen` (uuid-runtime was then installed), and
+  fuzz/010-simple-sb needed `btrfs-sb-mod`, which `make` does not build.
+  After the fixes all three pass on both testing and the devel control.
+- Not run, none of them a failure: the kernel has no reiserfs, ntfs3,
+  null_blk or dm-thin (convert 010-014, 022, 024; mkfs 017, 025, 030-033, 039;
+  misc 063); mkfs 040-remap-tree needs `btrfs check` support for
+  remap-tree, which devel lacks too; misc 035 is hard-coded not-run
+  upstream.  misc 065 needs a `make D=1` build and passed in one.
+- Kernel log over the whole run: no WARNING, BUG, KASAN, lockdep,
+  hung-task or Oops reports, taint 0; only the BTRFS warnings and errors
+  that the corruption tests provoke on purpose.
+- For this topic: the dump-tree tests (fuzz 004-simple-dump-tree, misc 072-dump-tree-chunk-bytenr) passed; whether any of them prints a dev_replace item was not checked.
 
 ## Not covered / open
 
index dc6bfe69fdfc087fc192fd450ae00c0e4762d098..f6f5f83f75e95c21ff6dc0dcc07f4c6e640c910d 100644 (file)
@@ -1,7 +1,7 @@
-From 224e9b1c4e197506343508762b01944987c6ab4e Mon Sep 17 00:00:00 2001
+From cb9e0be5cb6858ce8823f8ca1f9c6fd11abd333a Mon Sep 17 00:00:00 2001
 From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
-Date: Fri, 30 Oct 2026 09:48:05 -0400
-Subject: [PATCH 0/4] btrfs-progs: inspect logical-resolve: find the file names again
+Date: Fri, 30 Oct 2026 10:26:08 -0400
+Subject: [PATCH 0/3] btrfs-progs: inspect logical-resolve: find the file names again
 To: linux-btrfs@vger.kernel.org
 
 "btrfs inspect-internal logical-resolve" prints no file names for most
@@ -27,12 +27,13 @@ reference (-P lists them all); what fails is the step that turns a
 6. Hexadecimal addresses ("0x...") are rejected since v6.7
    (8f8d94b8c932).
 
-Patch 1 fixes 1: skip optional fields up to the lone "-".
+Defect 6 is left alone on purpose: it has been that way for years with
+no complaints, and decimal addresses, or shell arithmetic such as
+$((0x4b7c91f00000)), work around it.
 
-Patch 2 fixes 6: arg_strtou64() parses with base 0 again, through a new
-parse_u64_base(); parse_u64() stays decimal for its other callers.
+Patch 1 fixes 1: skip optional fields up to the lone "-".
 
-Patch 3 fixes 2 to 5.  For each reference, open the subvolume below the
+Patch 2 fixes 2 to 5.  For each reference, open the subvolume below the
 path argument if it is there (and print paths relative to the argument
 as given, so "." gives "./subvol/file"), otherwise through the mount of
 its deepest mounted ancestor or of itself.  Every candidate is checked
@@ -42,7 +43,7 @@ covers the bind mount case the mountinfo lookup was introduced for.
 find_mount_fsroot() and find_option() lose their only user and are
 replaced by iterate_btrfs_mounts().
 
-Patch 4 reports a reference whose subvolume cannot be reached at all as
+Patch 3 reports a reference whose subvolume cannot be reached at all as
 an error on stderr and exits with status 1, after printing all the other
 paths.  Today the message goes to stdout with status 0, so a script sees
 fewer paths, or none, and no error.  It updates misc-tests/042, which
@@ -53,41 +54,33 @@ never caught defect 3: it counted a "could not be accessed" line as a
 pass.
 
 User-visible changes:
-- Patch 2: every option parsed by arg_strtou64() accepts hexadecimal,
-  and also octal (a leading 0) again, exactly as before v6.7.  No
-  cli-tests or misc-tests pass a number with a leading zero.
-- Patch 3: paths are printed relative to the path argument when the
+- Patch 2: paths are printed relative to the path argument when the
   subvolume is below it, which changes the output even of setups that
   work today: with the top level at /mnt and subvol=/sv1 also mounted at
   /mnt2, sv1's file is printed as /mnt/sv1/f1 (was /mnt2/f1) when /mnt
   is the argument.  The mount point route is used only for subvolumes
   outside the argument.
-- Patch 4: the "could not be accessed" message moves from stdout to
+- Patch 3: the "could not be accessed" message moves from stdout to
   stderr, and the exit status becomes 1.  This patch is separable; the
   others do not depend on it.
 
-Patch 3 depends on patch 1 only for mounts in namespaces whose
-propagation is not exactly one optional field; patch 4 changes the
-message that patch 3 leaves in place.  Apply in order.
+Patch 2 depends on patch 1 only for mounts in namespaces whose
+propagation is not exactly one optional field; patch 3 changes the
+message that patch 2 leaves in place.  Apply in order.
 
 Link: https://github.com/kdave/btrfs-progs/issues/400
 
-Zygo Blaxell (4):
+Zygo Blaxell (3):
   btrfs-progs: utils: parse any number of optional fields in mountinfo
-  btrfs-progs: accept hexadecimal and octal numbers in arg_strtou64()
-    again
   btrfs-progs: inspect logical-resolve: find subvolumes under any mount
   btrfs-progs: inspect logical-resolve: fail on an unresolvable
     reference
 
  cmds/inspect.c                                | 283 +++++++++++++-----
- common/parse-utils.c                          |  13 +-
- common/parse-utils.h                          |   1 +
- common/string-utils.c                         |   5 +-
  common/utils.c                                | 135 +++------
  common/utils.h                                |   3 +-
  .../test.sh                                   |  26 +-
- 7 files changed, 290 insertions(+), 176 deletions(-)
+ 4 files changed, 275 insertions(+), 172 deletions(-)
 
 
 base-commit: 9d01fb77f46e98047df6767e237718b5ed816558
index 40fbeb35b897d720e913315ac59db5deb17c8735..75ca8c1e005248ce4f8fb158302cdf0690be766f 100644 (file)
@@ -1,7 +1,7 @@
 From 4bd84e5ad066c7e56ef9614a459fa616c168e8e9 Mon Sep 17 00:00:00 2001
 From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
 Date: Thu, 29 Oct 2026 23:28:01 -0400
-Subject: [PATCH 1/4] btrfs-progs: utils: parse any number of optional fields
+Subject: [PATCH 1/3] btrfs-progs: utils: parse any number of optional fields
  in mountinfo
 To: linux-btrfs@vger.kernel.org
 
diff --git a/topics/logical-resolve-fixes/0002-btrfs-progs-accept-hexadecimal-and-octal-numbers-in-.patch b/topics/logical-resolve-fixes/0002-btrfs-progs-accept-hexadecimal-and-octal-numbers-in-.patch
deleted file mode 100644 (file)
index 3921bb2..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-From 09299b6d15dfebc26bb3475099144c7efd4d90c0 Mon Sep 17 00:00:00 2001
-From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
-Date: Thu, 29 Oct 2026 23:28:34 -0400
-Subject: [PATCH 2/4] btrfs-progs: accept hexadecimal and octal numbers in
- arg_strtou64() again
-To: linux-btrfs@vger.kernel.org
-
-arg_strtou64() used strtoull() with base 0 since it was added, so every
-numeric command line argument parsed with it accepted 0x-prefixed
-hexadecimal.  Commit 8f8d94b8c932 ("btrfs-progs: use parse_u64() to
-implement arg_strtou64()") reimplemented it on top of parse_u64(),
-which has always parsed base 10 only, so since v6.7 for example
-
-  # btrfs inspect-internal logical-resolve 0x4b7c91f00000 /mnt
-  ERROR: 0x4b7c91f00000 is not a valid numeric value
-
-although logical addresses are commonly copied from kernel messages and
-other tools that print them in hex.
-
-Add parse_u64_base() and use base 0 in arg_strtou64() again; parse_u64()
-stays decimal for its other callers.
-
-Link: https://github.com/kdave/btrfs-progs/issues/400
-Fixes: 8f8d94b8c932 ("btrfs-progs: use parse_u64() to implement arg_strtou64()")
-Assisted-by: Claude:claude-opus-5-5
----
- common/parse-utils.c  | 13 ++++++++++---
- common/parse-utils.h  |  1 +
- common/string-utils.c |  5 ++++-
- 3 files changed, 15 insertions(+), 4 deletions(-)
-
-diff --git a/common/parse-utils.c b/common/parse-utils.c
-index 2efe4b10..76defa69 100644
---- a/common/parse-utils.c
-+++ b/common/parse-utils.c
-@@ -33,7 +33,8 @@
- #include "common/utils.h"
- 
- /*
-- * Parse a string to u64.
-+ * Parse a string to u64, in the given @base as for strtoull(): 0 accepts
-+ * decimal, 0x-prefixed hexadecimal and 0-prefixed octal.
-  *
-  * Return 0 if there is a valid numeric string and result would be stored in
-  * @result.
-@@ -41,7 +42,7 @@
-  * has any tailing characters, or a negative value).
-  * Return -ERANGE if the value is too large for u64.
-  */
--int parse_u64(const char *str, u64 *result)
-+int parse_u64_base(const char *str, u64 *result, int base)
- {
-       char *endptr;
-       u64 val;
-@@ -53,7 +54,7 @@ int parse_u64(const char *str, u64 *result)
-       if (str[0] == '-')
-               return -EINVAL;
-       errno = 0;
--      val = strtoull(str, &endptr, 10);
-+      val = strtoull(str, &endptr, base);
-       if (*endptr)
-               return -EINVAL;
-       if (val == ULLONG_MAX && errno == ERANGE)
-@@ -63,6 +64,12 @@ int parse_u64(const char *str, u64 *result)
-       return 0;
- }
- 
-+/* Parse a decimal string to u64, see parse_u64_base() */
-+int parse_u64(const char *str, u64 *result)
-+{
-+      return parse_u64_base(str, result, 10);
-+}
-+
- /*
-  * Parse range that's missing some part that can be implicit:
-  * a..b       - exact range, a can be equal to b
-diff --git a/common/parse-utils.h b/common/parse-utils.h
-index 1f77293c..c4a28f20 100644
---- a/common/parse-utils.h
-+++ b/common/parse-utils.h
-@@ -21,6 +21,7 @@
- 
- enum btrfs_csum_type parse_csum_type(const char *s);
- 
-+int parse_u64_base(const char *str, u64 *result, int base);
- int parse_u64(const char *str, u64 *result);
- int parse_u64_with_suffix(const char *s, u64 *value_ret);
- int parse_range_u32(const char *range, u32 *start, u32 *end);
-diff --git a/common/string-utils.c b/common/string-utils.c
-index e55c10c5..b2af66b6 100644
---- a/common/string-utils.c
-+++ b/common/string-utils.c
-@@ -106,6 +106,9 @@ int string_print_escape_special_len(const char *str, size_t str_len)
- }
- 
- /*
-+ * Parse a command line argument as u64 in decimal, 0x hexadecimal or 0 octal
-+ * (as strtoull() with base 0).
-+ *
-  * This function should be only used when parsing command arg, it won't return
-  * error to its caller and rather exit directly just like usage().
-  */
-@@ -114,7 +117,7 @@ u64 arg_strtou64(const char *str)
-       u64 value;
-       int ret;
- 
--      ret = parse_u64(str, &value);
-+      ret = parse_u64_base(str, &value, 0);
-       if (ret == -ERANGE) {
-               error("%s is too large", str);
-               exit(1);
--- 
-2.47.3
-
diff --git a/topics/logical-resolve-fixes/0002-btrfs-progs-inspect-logical-resolve-find-subvolumes-.patch b/topics/logical-resolve-fixes/0002-btrfs-progs-inspect-logical-resolve-find-subvolumes-.patch
new file mode 100644 (file)
index 0000000..54c1d95
--- /dev/null
@@ -0,0 +1,580 @@
+From fe46687a48d644baad91fd546a1a5eda90dc1b01 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 2/3] btrfs-progs: inspect logical-resolve: find subvolumes
+ under any mount
+To: linux-btrfs@vger.kernel.org
+
+Since v5.10, logical-resolve looks up a mount point whose mounted path
+inside the filesystem is exactly the subvolume of each reference, by
+comparing the subvol path and subvolid against /proc/self/mountinfo.
+Subvolumes are usually not mounted individually but reached as
+directories of the top level or of another subvolume, so nested
+subvolumes and snapshots are reported as
+
+  inode 257 subvol sv1 could not be accessed: not mounted
+
+even when the top level subvolume is mounted and is the path argument,
+and the command still exits with status 0.  Before v5.10 the same command
+printed the file names, relative to the path argument.  The lookup also
+has two older problems:
+
+- It accepts a mount of any btrfs filesystem that has a subvolume with
+  the same path and id (e.g. "/@home", 256, which is common), and calls
+  INO_PATHS there, which prints the names of unrelated files from the
+  wrong filesystem, or fails with ENOENT.
+
+- For references in the top level subvolume (id 5) it uses the path
+  argument without checking which subvolume that is, so when the
+  argument is a subvol= mount or a subvolume directory INO_PATHS
+  resolves the inode number in the wrong subvolume, and prints a wrong
+  name or fails with "ino paths ioctl: No such file or directory".
+
+Resolve the subvolume of each reference like this:
+
+1. Below the path argument: if the subvolume's path in the filesystem
+   is below the path of the argument, open it relative to the argument,
+   and print paths relative to the argument as given, like before v5.10
+   (so "." gives "./subvol/file").
+
+2. Otherwise through the mount of its deepest ancestor (or of itself):
+   among btrfs mounts whose mounted path is the subvolume's path or a
+   prefix of it at a path component boundary, the longest one that
+   leads to the subvolume.
+
+In both cases the opened directory is checked to be the root of that
+subvolume (inode 256, INO_LOOKUP root id) on the same filesystem (fsid
+from FS_INFO) before INO_PATHS is called on it.  That check also takes
+care of the bind mount case that the mountinfo lookup was introduced
+for: a bind mount of a directory inside a subvolume does not have the
+subvolume's path as its mounted path, so it is not an ancestor.
+
+find_mount_fsroot() and find_option() lose their only user; replace
+them with iterate_btrfs_mounts(), which reports every btrfs mount and
+leaves the matching to the caller.
+
+Link: https://github.com/kdave/btrfs-progs/issues/400
+Fixes: 6b8fed9e798d ("btrfs-progs: inspect: use find_mount_fsroot in logical-resolve")
+Fixes: 6055e736045d ("Btrfs-progs: added ioctls and commands to resolve inodes and logical addrs")
+Assisted-by: Claude:claude-opus-5-5
+---
+ cmds/inspect.c | 282 +++++++++++++++++++++++++++++++++++++------------
+ common/utils.c | 115 ++++----------------
+ common/utils.h |   3 +-
+ 3 files changed, 237 insertions(+), 163 deletions(-)
+
+diff --git a/cmds/inspect.c b/cmds/inspect.c
+index 35a51e42..0c61b4d5 100644
+--- a/cmds/inspect.c
++++ b/cmds/inspect.c
+@@ -140,6 +140,183 @@ static int cmd_inspect_inode_resolve(const struct cmd_struct *cmd,
+ }
+ static DEFINE_SIMPLE_COMMAND(inspect_inode_resolve, "inode-resolve");
+ 
++/*
++ * If @path is @prefix or below it, return the rest of @path relative to
++ * @prefix ("" if equal), else NULL.  Both are relative to the top level
++ * subvolume, without leading or trailing slash.
++ */
++static const char *path_below(const char *path, const char *prefix)
++{
++      size_t len = strlen(prefix);
++
++      if (len == 0)
++              return path;
++      if (strncmp(path, prefix, len) != 0)
++              return NULL;
++      if (path[len] == 0)
++              return path + len;
++      if (path[len] == '/')
++              return path + len + 1;
++      return NULL;
++}
++
++/*
++ * Path of the directory open at @fd relative to the top level subvolume of
++ * its filesystem, without leading or trailing slash ("" for the top level).
++ */
++static int fs_path_of_fd(int fd, char *buf, size_t size)
++{
++      struct btrfs_ioctl_ino_lookup_args args = { 0 };
++      struct stat st;
++      u64 rootid;
++      size_t len;
++      int ret;
++
++      ret = lookup_path_rootid(fd, &rootid);
++      if (ret < 0)
++              return ret;
++      ret = btrfs_subvolid_resolve(fd, buf, size, rootid);
++      if (ret < 0)
++              return ret;
++      if (fstat(fd, &st) < 0)
++              return -errno;
++      if (st.st_ino == BTRFS_FIRST_FREE_OBJECTID)
++              return 0;
++
++      /* A directory inside the subvolume, its path ends with a slash */
++      args.treeid = rootid;
++      args.objectid = st.st_ino;
++      if (ioctl(fd, BTRFS_IOC_INO_LOOKUP, &args) < 0)
++              return -errno;
++      len = strlen(args.name);
++      if (len && args.name[len - 1] == '/')
++              args.name[--len] = 0;
++      if (strlen(buf) + 1 + len + 1 > size)
++              return -EOVERFLOW;
++      if (buf[0])
++              strcat(buf, "/");
++      strcat(buf, args.name);
++      return 0;
++}
++
++struct subvol_lookup {
++      /* In: subvolume id, its path from the top level, filesystem fsid */
++      u64 root;
++      const char *subvol;
++      u8 fsid[BTRFS_FSID_SIZE];
++      /* Out: open subvolume root, its path from user's view, how matched */
++      int fd;
++      char path[PATH_MAX];
++      size_t matched_len;
++};
++
++/*
++ * Open @dir/@rest and check that it is the root directory of subvolume
++ * @sl->root in the filesystem @sl->fsid.  Return the fd or -errno.
++ */
++static int open_subvol_checked(struct subvol_lookup *sl, const char *dir,
++                             const char *rest, char *path, size_t size)
++{
++      struct btrfs_ioctl_fs_info_args fi = { 0 };
++      struct stat st;
++      u64 rootid;
++      int ret;
++      int fd;
++
++      if (rest[0])
++              ret = snprintf(path, size, "%s%s%s", dir,
++                             dir[strlen(dir) - 1] == '/' ? "" : "/", rest);
++      else
++              ret = snprintf(path, size, "%s", dir);
++      if (ret < 0 || ret >= size)
++              return -EOVERFLOW;
++
++      fd = open(path, O_RDONLY | O_DIRECTORY);
++      if (fd < 0)
++              return -errno;
++      if (fstat(fd, &st) < 0 || st.st_ino != BTRFS_FIRST_FREE_OBJECTID ||
++          lookup_path_rootid(fd, &rootid) < 0 || rootid != sl->root ||
++          ioctl(fd, BTRFS_IOC_FS_INFO, &fi) < 0 ||
++          memcmp(fi.fsid, sl->fsid, BTRFS_FSID_SIZE) != 0) {
++              close(fd);
++              return -ENOENT;
++      }
++      return fd;
++}
++
++/*
++ * Callback of iterate_btrfs_mounts(): pick the mount of the deepest ancestor
++ * of the subvolume (or of the subvolume itself), whatever its name, if it
++ * belongs to the same filesystem and the subvolume is reachable under it.
++ */
++static int subvol_lookup_mount(const char *fsroot, const char *mnt, void *priv)
++{
++      struct subvol_lookup *sl = priv;
++      char path[PATH_MAX];
++      const char *rest;
++      size_t len;
++      int fd;
++
++      while (fsroot[0] == '/')
++              fsroot++;
++      rest = path_below(sl->subvol, fsroot);
++      if (!rest)
++              return 0;
++      len = strlen(fsroot) + 1;
++      if (sl->fd >= 0 && len <= sl->matched_len)
++              return 0;
++      fd = open_subvol_checked(sl, mnt, rest, path, sizeof(path));
++      if (fd < 0)
++              return 0;
++      if (sl->fd >= 0)
++              close(sl->fd);
++      sl->fd = fd;
++      sl->matched_len = len;
++      strncpy_null(sl->path, path, sizeof(sl->path));
++      return 0;
++}
++
++/*
++ * Open the root directory of subvolume @root of the filesystem that @fd (the
++ * user's @arg) belongs to, and store the path to print in front of the inode
++ * paths in @sl->path.  Prefer a path below @arg, as logical-resolve did
++ * before v5.10, so that paths are printed as the user named them; then a
++ * mount point of the subvolume or of any of its ancestors.
++ *
++ * Return a new fd, or -errno.
++ */
++static int open_subvol_for_root(int fd, const char *arg, const char *arg_fs_path,
++                              const u8 *fsid, u64 root, struct subvol_lookup *sl)
++{
++      char subvol[PATH_MAX];
++      const char *rest;
++      int ret;
++
++      memset(sl, 0, sizeof(*sl));
++      sl->fd = -1;
++      sl->root = root;
++      memcpy(sl->fsid, fsid, BTRFS_FSID_SIZE);
++
++      ret = btrfs_subvolid_resolve(fd, subvol, sizeof(subvol), root);
++      if (ret < 0)
++              return ret;
++      sl->subvol = subvol;
++
++      rest = path_below(subvol, arg_fs_path);
++      if (rest) {
++              ret = open_subvol_checked(sl, arg, rest, sl->path, sizeof(sl->path));
++              if (ret >= 0)
++                      return ret;
++      }
++
++      ret = iterate_btrfs_mounts(subvol_lookup_mount, sl);
++      if (ret < 0)
++              return ret;
++      if (sl->fd < 0)
++              return -ENOENT;
++      return sl->fd;
++}
++
+ static const char * const cmd_inspect_logical_resolve_usage[] = {
+       "btrfs inspect-internal logical-resolve [-Pvo] [-s bufsize] <logical> <path>",
+       "Get file system paths for the given logical address",
+@@ -163,12 +340,11 @@ static int cmd_inspect_logical_resolve(const struct cmd_struct *cmd,
+       int fd;
+       int i;
+       bool getpath = true;
+-      int bytes_left;
+       struct btrfs_ioctl_logical_ino_args loi = { 0 };
+       struct btrfs_data_container *inodes;
+       u64 size = SZ_64K;
+-      char full_path[PATH_MAX];
+-      char *path_ptr;
++      char arg_fs_path[PATH_MAX];
++      u8 fsid[BTRFS_FSID_SIZE] = { 0 };
+       u64 flags = 0;
+       unsigned long request = BTRFS_IOC_LOGICAL_INO;
+ 
+@@ -230,13 +406,22 @@ static int cmd_inspect_logical_resolve(const struct cmd_struct *cmd,
+                  (unsigned long)inodes->bytes_missing, inodes->elem_cnt,
+                  inodes->elem_missed);
+ 
+-      bytes_left = sizeof(full_path);
+-      ret = snprintf(full_path, bytes_left, "%s/", argv[optind+1]);
+-      path_ptr = full_path + ret;
+-      bytes_left -= ret + 1;
+-      if (bytes_left < 0) {
+-              error("path buffer too small: %d bytes", bytes_left);
+-              goto out;
++      if (getpath) {
++              struct btrfs_ioctl_fs_info_args fi = { 0 };
++
++              if (ioctl(fd, BTRFS_IOC_FS_INFO, &fi) < 0) {
++                      ret = -errno;
++                      error("cannot get filesystem info: %m");
++                      goto out;
++              }
++              memcpy(fsid, fi.fsid, BTRFS_FSID_SIZE);
++              ret = fs_path_of_fd(fd, arg_fs_path, sizeof(arg_fs_path));
++              if (ret < 0) {
++                      errno = -ret;
++                      error("cannot resolve path of %s in the filesystem: %m",
++                            argv[optind + 1]);
++                      goto out;
++              }
+       }
+       ret = 0;
+ 
+@@ -244,68 +429,31 @@ static int cmd_inspect_logical_resolve(const struct cmd_struct *cmd,
+               u64 inum = inodes->val[i];
+               u64 offset = inodes->val[i+1];
+               u64 root = inodes->val[i+2];
++              struct subvol_lookup sl;
+               int path_fd;
++              int ret2;
+ 
+-              if (getpath) {
+-                      char mount_path[PATH_MAX];
+-                      char name[PATH_MAX];
+-
+-                      ret = btrfs_subvolid_resolve(fd, name, sizeof(name), root);
+-                      if (ret < 0)
+-                              goto out;
+-
+-                      if (name[0] == 0) {
+-                              path_ptr[-1] = '\0';
+-                              path_fd = fd;
+-                              strncpy_null(mount_path, full_path, sizeof(mount_path));
+-                      } else {
+-                              char *mounted = NULL;
+-                              char subvol[PATH_MAX];
+-                              char subvolid[PATH_MAX];
+-
+-                              /*
+-                               * btrfs_subvolid_resolve returns the full
+-                               * path to the subvolume pointed by root, but the
+-                               * subvolume can be mounted in a directory name
+-                               * different from the subvolume name. In this
+-                               * case we need to find the correct mount point
+-                               * using same subvolume path and subvol id found
+-                               * before.
+-                               */
+-
+-                              snprintf(subvol, PATH_MAX, "/%s", name);
+-                              snprintf(subvolid, PATH_MAX, "%llu", root);
+-
+-                              ret = find_mount_fsroot(subvol, subvolid, &mounted);
+-
+-                              if (ret) {
+-                                      error("failed to parse mountinfo");
+-                                      goto out;
+-                              }
+-
+-                              if (!mounted) {
+-                                      printf(
+-                      "inode %llu subvol %s could not be accessed: not mounted\n",
+-                                              inum, name);
+-                                      continue;
+-                              }
+-
+-                              strncpy_null(mount_path, mounted, sizeof(mount_path));
+-                              free(mounted);
+-
+-                              path_fd = btrfs_open_dir(mount_path);
+-                              if (path_fd < 0) {
+-                                      ret = -ENOENT;
+-                                      goto out;
+-                              }
+-                      }
+-                      ret = __ino_to_path_fd(inum, path_fd, mount_path);
+-                      if (path_fd != fd)
+-                              close(path_fd);
+-              } else {
++              if (!getpath) {
+                       pr_default("inode %llu offset %llu root %llu\n", inum,
+                               offset, root);
++                      continue;
++              }
++
++              path_fd = open_subvol_for_root(fd, argv[optind + 1], arg_fs_path,
++                                             fsid, root, &sl);
++              if (path_fd < 0) {
++                      char name[PATH_MAX];
++
++                      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>");
++                      continue;
+               }
++              ret2 = __ino_to_path_fd(inum, path_fd, sl.path);
++              if (ret2)
++                      ret = ret2;
++              close(path_fd);
+       }
+ 
+ out:
+diff --git a/common/utils.c b/common/utils.c
+index 11ca82f8..f6165abb 100644
+--- a/common/utils.c
++++ b/common/utils.c
+@@ -371,33 +371,6 @@ struct mnt_entry {
+       const char *options2;
+ };
+ 
+-/*
+- * Find first occurrence of up an option string (as "option=") in @options,
+- * separated by comma. Return allocated string as "option=value"
+- *
+- * If NULL is returned, the caller needs to check errno to make sure it's not
+- * caused by memory allocation failure.
+- */
+-static char *find_option(const char *options, const char *option)
+-{
+-      const char *tmp;
+-      char *ret;
+-      int i;
+-
+-      errno = 0;
+-      tmp = strstr(options, option);
+-      if (!tmp)
+-              return NULL;
+-      ret = strdup(tmp);
+-      if (!ret)
+-              return NULL;
+-      i = 0;
+-      while (*(ret + i) && *(ret + i) != ',')
+-              i++;
+-      *(ret + i) = '\0';
+-      return ret;
+-}
+-
+ /* Match whitespace separator */
+ static bool is_sep(char c)
+ {
+@@ -542,44 +515,38 @@ static void parse_mntinfo_line(char *line, struct mnt_entry *ent)
+ }
+ 
+ /*
+- * Compare the subvolume passed with the pathname of the directory mounted in
+- * btrfs. The pathname inside btrfs is different from getmnt and friends, since
+- * it can detect bind mounts to content from the inside of the original mount.
++ * Call @cb for each btrfs mount in /proc/self/mountinfo, in order, with the
++ * pathname inside the filesystem that is mounted (field 3, e.g. "/" for the
++ * top level subvolume, "/vol" for a subvolume, "/vol/dir" for a bind mount of
++ * a directory) and the mount point (field 4), both unmangled.  Iteration
++ * stops when @cb returns non-zero, and that value is returned.
++ *
++ * Note that the mount options (subvol=, subvolid=) of a bind mount are those
++ * of the original mount, only the pathname tells what is visible under it:
+  *
+- * Example:
+  *   # mount -o subvol=/vol /dev/sda2 /mnt
+  *   # mount --bind /mnt/dir2 /othermnt
+- *
+- *   # mounts
+- *   ...
+- *   /dev/sda2 on /mnt type btrfs (ro,relatime,ssd,space_cache,subvolid=256,subvol=/vol)
+- *   /dev/sda2 on /othermnt type btrfs (ro,relatime,ssd,space_cache,subvolid=256,subvol=/vol)
+- *
+  *   # cat /proc/self/mountinfo
+- *
+  *   38 30 0:32 /vol /mnt ro,relatime - btrfs /dev/sda2 ro,ssd,space_cache,subvolid=256,subvol=/vol
+  *   37 29 0:32 /vol/dir2 /othermnt ro,relatime - btrfs /dev/sda2 ro,ssd,space_cache,subvolid=256,subvol=/vol
+  *
+- * If we try to find a mount point only using subvol and subvolid from mount
+- * options we would get mislead to believe that /othermnt has the same content
+- * as /mnt.
++ * Mounts of all btrfs filesystems are reported, callers must check which
++ * filesystem a mount point belongs to.
+  *
+- * But, using mountinfo, we have the pathaname _inside_ the filesystem, so we
+- * can filter out the mount points with bind mounts which have different content
+- * from the original mounts, in this case the mount point with id 37.
++ * Return 0 after the last mount, the non-zero value of @cb, or -errno.
+  */
+-int find_mount_fsroot(const char *subvol, const char *subvolid, char **mount)
++int iterate_btrfs_mounts(int (*cb)(const char *fsroot, const char *mnt, void *priv),
++                       void *priv)
+ {
+       FILE *mnt;
+       char *buf = NULL;
+       int bs = 4096;
+       int line = 0;
+       int ret = 0;
+-      bool found = false;
+ 
+       mnt = fopen("/proc/self/mountinfo", "r");
+       if (!mnt)
+-              return -1;
++              return -errno;
+ 
+       buf = malloc(bs);
+       if (!buf) {
+@@ -596,62 +563,23 @@ int find_mount_fsroot(const char *subvol, const char *subvolid, char **mount)
+ 
+               if (ch == '\n') {
+                       struct mnt_entry ent;
+-                      char *opt;
+-                      const char *value;
+ 
+                       buf[line] = 0;
++                      line = 0;
+                       parse_mntinfo_line(buf, &ent);
+-
+-                      /* Skip unrelated mounts */
+                       if (strcmp(ent.fstype, "btrfs") != 0)
+-                              goto nextline;
+-                      if (strlen(ent.root) != strlen(subvol))
+-                              goto nextline;
+-                      if (strcmp(ent.root, subvol) != 0)
+-                              goto nextline;
+-
+-                      /*
+-                       * Match subvolume by id found in mountinfo and
+-                       * requested by the caller
+-                       */
+-                      opt = find_option(ent.options2, "subvolid=");
+-                      if (opt == NULL && errno != 0) {
+-                              ret = -errno;
+-                              goto out;
+-                      }
+-                      if (!opt)
+-                              goto nextline;
+-                      value = opt + strlen("subvolid=");
+-                      if (strcmp(value, subvolid) != 0) {
+-                              free(opt);
+-                              goto nextline;
+-                      }
+-                      free(opt);
+-
+-                      /*
+-                       * First match is in most cases the original mount, not
+-                       * a bind mount. In case there are no further bind
+-                       * mounts, return what we found in @mount.  Any
+-                       * following mount that matches by path and subvolume
+-                       * id is a bind mount and we return the original mount.
+-                       */
+-                      if (found)
++                              continue;
++                      ret = cb(ent.root, ent.path, priv);
++                      if (ret)
+                               goto out;
+-                      found = true;
+-                      *mount = strdup(ent.path);
+-                      if (!*mount) {
+-                              ret = -ENOMEM;
+-                              goto out;
+-                      }
+-                      ret = 0;
+-                      goto nextline;
++                      continue;
+               }
+               /*
+                * Grow buffer if needed, there are 3 paths up to PATH_MAX and
+                * mount options are limited by page size. Often the overall
+                * line length does not exceed 256.
+                */
+-              if (line >= bs) {
++              if (line >= bs - 1) {
+                       char *tmp;
+ 
+                       bs += 4096;
+@@ -663,9 +591,6 @@ int find_mount_fsroot(const char *subvol, const char *subvolid, char **mount)
+                       buf = tmp;
+               }
+               buf[line++] = ch;
+-              continue;
+-nextline:
+-              line = 0;
+       } while (1);
+ out:
+       free(buf);
+diff --git a/common/utils.h b/common/utils.h
+index 94f9405e..faab2303 100644
+--- a/common/utils.h
++++ b/common/utils.h
+@@ -69,7 +69,8 @@ const char *get_fs_exclop_name(int op);
+ int check_arg_type(const char *input);
+ int ask_user(const char *question);
+ int lookup_path_rootid(int fd, u64 *rootid);
+-int find_mount_fsroot(const char *subvol, const char *subvolid, char **mount);
++int iterate_btrfs_mounts(int (*cb)(const char *fsroot, const char *mnt, void *priv),
++                       void *priv);
+ int find_mount_root(const char *path, char **mount_root);
+ int get_df(int fd, struct btrfs_ioctl_space_args **sargs_ret);
+ 
+-- 
+2.47.3
+
diff --git a/topics/logical-resolve-fixes/0003-btrfs-progs-inspect-logical-resolve-fail-on-an-unres.patch b/topics/logical-resolve-fixes/0003-btrfs-progs-inspect-logical-resolve-fail-on-an-unres.patch
new file mode 100644 (file)
index 0000000..8ef0258
--- /dev/null
@@ -0,0 +1,98 @@
+From cb9e0be5cb6858ce8823f8ca1f9c6fd11abd333a 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 3/3] 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
+
diff --git a/topics/logical-resolve-fixes/0003-btrfs-progs-inspect-logical-resolve-find-subvolumes-.patch b/topics/logical-resolve-fixes/0003-btrfs-progs-inspect-logical-resolve-find-subvolumes-.patch
deleted file mode 100644 (file)
index c275397..0000000
+++ /dev/null
@@ -1,580 +0,0 @@
-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
-To: linux-btrfs@vger.kernel.org
-
-Since v5.10, logical-resolve looks up a mount point whose mounted path
-inside the filesystem is exactly the subvolume of each reference, by
-comparing the subvol path and subvolid against /proc/self/mountinfo.
-Subvolumes are usually not mounted individually but reached as
-directories of the top level or of another subvolume, so nested
-subvolumes and snapshots are reported as
-
-  inode 257 subvol sv1 could not be accessed: not mounted
-
-even when the top level subvolume is mounted and is the path argument,
-and the command still exits with status 0.  Before v5.10 the same command
-printed the file names, relative to the path argument.  The lookup also
-has two older problems:
-
-- It accepts a mount of any btrfs filesystem that has a subvolume with
-  the same path and id (e.g. "/@home", 256, which is common), and calls
-  INO_PATHS there, which prints the names of unrelated files from the
-  wrong filesystem, or fails with ENOENT.
-
-- For references in the top level subvolume (id 5) it uses the path
-  argument without checking which subvolume that is, so when the
-  argument is a subvol= mount or a subvolume directory INO_PATHS
-  resolves the inode number in the wrong subvolume, and prints a wrong
-  name or fails with "ino paths ioctl: No such file or directory".
-
-Resolve the subvolume of each reference like this:
-
-1. Below the path argument: if the subvolume's path in the filesystem
-   is below the path of the argument, open it relative to the argument,
-   and print paths relative to the argument as given, like before v5.10
-   (so "." gives "./subvol/file").
-
-2. Otherwise through the mount of its deepest ancestor (or of itself):
-   among btrfs mounts whose mounted path is the subvolume's path or a
-   prefix of it at a path component boundary, the longest one that
-   leads to the subvolume.
-
-In both cases the opened directory is checked to be the root of that
-subvolume (inode 256, INO_LOOKUP root id) on the same filesystem (fsid
-from FS_INFO) before INO_PATHS is called on it.  That check also takes
-care of the bind mount case that the mountinfo lookup was introduced
-for: a bind mount of a directory inside a subvolume does not have the
-subvolume's path as its mounted path, so it is not an ancestor.
-
-find_mount_fsroot() and find_option() lose their only user; replace
-them with iterate_btrfs_mounts(), which reports every btrfs mount and
-leaves the matching to the caller.
-
-Link: https://github.com/kdave/btrfs-progs/issues/400
-Fixes: 6b8fed9e798d ("btrfs-progs: inspect: use find_mount_fsroot in logical-resolve")
-Fixes: 6055e736045d ("Btrfs-progs: added ioctls and commands to resolve inodes and logical addrs")
-Assisted-by: Claude:claude-opus-5-5
----
- cmds/inspect.c | 282 +++++++++++++++++++++++++++++++++++++------------
- common/utils.c | 115 ++++----------------
- common/utils.h |   3 +-
- 3 files changed, 237 insertions(+), 163 deletions(-)
-
-diff --git a/cmds/inspect.c b/cmds/inspect.c
-index 35a51e42..0c61b4d5 100644
---- a/cmds/inspect.c
-+++ b/cmds/inspect.c
-@@ -140,6 +140,183 @@ static int cmd_inspect_inode_resolve(const struct cmd_struct *cmd,
- }
- static DEFINE_SIMPLE_COMMAND(inspect_inode_resolve, "inode-resolve");
- 
-+/*
-+ * If @path is @prefix or below it, return the rest of @path relative to
-+ * @prefix ("" if equal), else NULL.  Both are relative to the top level
-+ * subvolume, without leading or trailing slash.
-+ */
-+static const char *path_below(const char *path, const char *prefix)
-+{
-+      size_t len = strlen(prefix);
-+
-+      if (len == 0)
-+              return path;
-+      if (strncmp(path, prefix, len) != 0)
-+              return NULL;
-+      if (path[len] == 0)
-+              return path + len;
-+      if (path[len] == '/')
-+              return path + len + 1;
-+      return NULL;
-+}
-+
-+/*
-+ * Path of the directory open at @fd relative to the top level subvolume of
-+ * its filesystem, without leading or trailing slash ("" for the top level).
-+ */
-+static int fs_path_of_fd(int fd, char *buf, size_t size)
-+{
-+      struct btrfs_ioctl_ino_lookup_args args = { 0 };
-+      struct stat st;
-+      u64 rootid;
-+      size_t len;
-+      int ret;
-+
-+      ret = lookup_path_rootid(fd, &rootid);
-+      if (ret < 0)
-+              return ret;
-+      ret = btrfs_subvolid_resolve(fd, buf, size, rootid);
-+      if (ret < 0)
-+              return ret;
-+      if (fstat(fd, &st) < 0)
-+              return -errno;
-+      if (st.st_ino == BTRFS_FIRST_FREE_OBJECTID)
-+              return 0;
-+
-+      /* A directory inside the subvolume, its path ends with a slash */
-+      args.treeid = rootid;
-+      args.objectid = st.st_ino;
-+      if (ioctl(fd, BTRFS_IOC_INO_LOOKUP, &args) < 0)
-+              return -errno;
-+      len = strlen(args.name);
-+      if (len && args.name[len - 1] == '/')
-+              args.name[--len] = 0;
-+      if (strlen(buf) + 1 + len + 1 > size)
-+              return -EOVERFLOW;
-+      if (buf[0])
-+              strcat(buf, "/");
-+      strcat(buf, args.name);
-+      return 0;
-+}
-+
-+struct subvol_lookup {
-+      /* In: subvolume id, its path from the top level, filesystem fsid */
-+      u64 root;
-+      const char *subvol;
-+      u8 fsid[BTRFS_FSID_SIZE];
-+      /* Out: open subvolume root, its path from user's view, how matched */
-+      int fd;
-+      char path[PATH_MAX];
-+      size_t matched_len;
-+};
-+
-+/*
-+ * Open @dir/@rest and check that it is the root directory of subvolume
-+ * @sl->root in the filesystem @sl->fsid.  Return the fd or -errno.
-+ */
-+static int open_subvol_checked(struct subvol_lookup *sl, const char *dir,
-+                             const char *rest, char *path, size_t size)
-+{
-+      struct btrfs_ioctl_fs_info_args fi = { 0 };
-+      struct stat st;
-+      u64 rootid;
-+      int ret;
-+      int fd;
-+
-+      if (rest[0])
-+              ret = snprintf(path, size, "%s%s%s", dir,
-+                             dir[strlen(dir) - 1] == '/' ? "" : "/", rest);
-+      else
-+              ret = snprintf(path, size, "%s", dir);
-+      if (ret < 0 || ret >= size)
-+              return -EOVERFLOW;
-+
-+      fd = open(path, O_RDONLY | O_DIRECTORY);
-+      if (fd < 0)
-+              return -errno;
-+      if (fstat(fd, &st) < 0 || st.st_ino != BTRFS_FIRST_FREE_OBJECTID ||
-+          lookup_path_rootid(fd, &rootid) < 0 || rootid != sl->root ||
-+          ioctl(fd, BTRFS_IOC_FS_INFO, &fi) < 0 ||
-+          memcmp(fi.fsid, sl->fsid, BTRFS_FSID_SIZE) != 0) {
-+              close(fd);
-+              return -ENOENT;
-+      }
-+      return fd;
-+}
-+
-+/*
-+ * Callback of iterate_btrfs_mounts(): pick the mount of the deepest ancestor
-+ * of the subvolume (or of the subvolume itself), whatever its name, if it
-+ * belongs to the same filesystem and the subvolume is reachable under it.
-+ */
-+static int subvol_lookup_mount(const char *fsroot, const char *mnt, void *priv)
-+{
-+      struct subvol_lookup *sl = priv;
-+      char path[PATH_MAX];
-+      const char *rest;
-+      size_t len;
-+      int fd;
-+
-+      while (fsroot[0] == '/')
-+              fsroot++;
-+      rest = path_below(sl->subvol, fsroot);
-+      if (!rest)
-+              return 0;
-+      len = strlen(fsroot) + 1;
-+      if (sl->fd >= 0 && len <= sl->matched_len)
-+              return 0;
-+      fd = open_subvol_checked(sl, mnt, rest, path, sizeof(path));
-+      if (fd < 0)
-+              return 0;
-+      if (sl->fd >= 0)
-+              close(sl->fd);
-+      sl->fd = fd;
-+      sl->matched_len = len;
-+      strncpy_null(sl->path, path, sizeof(sl->path));
-+      return 0;
-+}
-+
-+/*
-+ * Open the root directory of subvolume @root of the filesystem that @fd (the
-+ * user's @arg) belongs to, and store the path to print in front of the inode
-+ * paths in @sl->path.  Prefer a path below @arg, as logical-resolve did
-+ * before v5.10, so that paths are printed as the user named them; then a
-+ * mount point of the subvolume or of any of its ancestors.
-+ *
-+ * Return a new fd, or -errno.
-+ */
-+static int open_subvol_for_root(int fd, const char *arg, const char *arg_fs_path,
-+                              const u8 *fsid, u64 root, struct subvol_lookup *sl)
-+{
-+      char subvol[PATH_MAX];
-+      const char *rest;
-+      int ret;
-+
-+      memset(sl, 0, sizeof(*sl));
-+      sl->fd = -1;
-+      sl->root = root;
-+      memcpy(sl->fsid, fsid, BTRFS_FSID_SIZE);
-+
-+      ret = btrfs_subvolid_resolve(fd, subvol, sizeof(subvol), root);
-+      if (ret < 0)
-+              return ret;
-+      sl->subvol = subvol;
-+
-+      rest = path_below(subvol, arg_fs_path);
-+      if (rest) {
-+              ret = open_subvol_checked(sl, arg, rest, sl->path, sizeof(sl->path));
-+              if (ret >= 0)
-+                      return ret;
-+      }
-+
-+      ret = iterate_btrfs_mounts(subvol_lookup_mount, sl);
-+      if (ret < 0)
-+              return ret;
-+      if (sl->fd < 0)
-+              return -ENOENT;
-+      return sl->fd;
-+}
-+
- static const char * const cmd_inspect_logical_resolve_usage[] = {
-       "btrfs inspect-internal logical-resolve [-Pvo] [-s bufsize] <logical> <path>",
-       "Get file system paths for the given logical address",
-@@ -163,12 +340,11 @@ static int cmd_inspect_logical_resolve(const struct cmd_struct *cmd,
-       int fd;
-       int i;
-       bool getpath = true;
--      int bytes_left;
-       struct btrfs_ioctl_logical_ino_args loi = { 0 };
-       struct btrfs_data_container *inodes;
-       u64 size = SZ_64K;
--      char full_path[PATH_MAX];
--      char *path_ptr;
-+      char arg_fs_path[PATH_MAX];
-+      u8 fsid[BTRFS_FSID_SIZE] = { 0 };
-       u64 flags = 0;
-       unsigned long request = BTRFS_IOC_LOGICAL_INO;
- 
-@@ -230,13 +406,22 @@ static int cmd_inspect_logical_resolve(const struct cmd_struct *cmd,
-                  (unsigned long)inodes->bytes_missing, inodes->elem_cnt,
-                  inodes->elem_missed);
- 
--      bytes_left = sizeof(full_path);
--      ret = snprintf(full_path, bytes_left, "%s/", argv[optind+1]);
--      path_ptr = full_path + ret;
--      bytes_left -= ret + 1;
--      if (bytes_left < 0) {
--              error("path buffer too small: %d bytes", bytes_left);
--              goto out;
-+      if (getpath) {
-+              struct btrfs_ioctl_fs_info_args fi = { 0 };
-+
-+              if (ioctl(fd, BTRFS_IOC_FS_INFO, &fi) < 0) {
-+                      ret = -errno;
-+                      error("cannot get filesystem info: %m");
-+                      goto out;
-+              }
-+              memcpy(fsid, fi.fsid, BTRFS_FSID_SIZE);
-+              ret = fs_path_of_fd(fd, arg_fs_path, sizeof(arg_fs_path));
-+              if (ret < 0) {
-+                      errno = -ret;
-+                      error("cannot resolve path of %s in the filesystem: %m",
-+                            argv[optind + 1]);
-+                      goto out;
-+              }
-       }
-       ret = 0;
- 
-@@ -244,68 +429,31 @@ static int cmd_inspect_logical_resolve(const struct cmd_struct *cmd,
-               u64 inum = inodes->val[i];
-               u64 offset = inodes->val[i+1];
-               u64 root = inodes->val[i+2];
-+              struct subvol_lookup sl;
-               int path_fd;
-+              int ret2;
- 
--              if (getpath) {
--                      char mount_path[PATH_MAX];
--                      char name[PATH_MAX];
--
--                      ret = btrfs_subvolid_resolve(fd, name, sizeof(name), root);
--                      if (ret < 0)
--                              goto out;
--
--                      if (name[0] == 0) {
--                              path_ptr[-1] = '\0';
--                              path_fd = fd;
--                              strncpy_null(mount_path, full_path, sizeof(mount_path));
--                      } else {
--                              char *mounted = NULL;
--                              char subvol[PATH_MAX];
--                              char subvolid[PATH_MAX];
--
--                              /*
--                               * btrfs_subvolid_resolve returns the full
--                               * path to the subvolume pointed by root, but the
--                               * subvolume can be mounted in a directory name
--                               * different from the subvolume name. In this
--                               * case we need to find the correct mount point
--                               * using same subvolume path and subvol id found
--                               * before.
--                               */
--
--                              snprintf(subvol, PATH_MAX, "/%s", name);
--                              snprintf(subvolid, PATH_MAX, "%llu", root);
--
--                              ret = find_mount_fsroot(subvol, subvolid, &mounted);
--
--                              if (ret) {
--                                      error("failed to parse mountinfo");
--                                      goto out;
--                              }
--
--                              if (!mounted) {
--                                      printf(
--                      "inode %llu subvol %s could not be accessed: not mounted\n",
--                                              inum, name);
--                                      continue;
--                              }
--
--                              strncpy_null(mount_path, mounted, sizeof(mount_path));
--                              free(mounted);
--
--                              path_fd = btrfs_open_dir(mount_path);
--                              if (path_fd < 0) {
--                                      ret = -ENOENT;
--                                      goto out;
--                              }
--                      }
--                      ret = __ino_to_path_fd(inum, path_fd, mount_path);
--                      if (path_fd != fd)
--                              close(path_fd);
--              } else {
-+              if (!getpath) {
-                       pr_default("inode %llu offset %llu root %llu\n", inum,
-                               offset, root);
-+                      continue;
-+              }
-+
-+              path_fd = open_subvol_for_root(fd, argv[optind + 1], arg_fs_path,
-+                                             fsid, root, &sl);
-+              if (path_fd < 0) {
-+                      char name[PATH_MAX];
-+
-+                      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>");
-+                      continue;
-               }
-+              ret2 = __ino_to_path_fd(inum, path_fd, sl.path);
-+              if (ret2)
-+                      ret = ret2;
-+              close(path_fd);
-       }
- 
- out:
-diff --git a/common/utils.c b/common/utils.c
-index 11ca82f8..f6165abb 100644
---- a/common/utils.c
-+++ b/common/utils.c
-@@ -371,33 +371,6 @@ struct mnt_entry {
-       const char *options2;
- };
- 
--/*
-- * Find first occurrence of up an option string (as "option=") in @options,
-- * separated by comma. Return allocated string as "option=value"
-- *
-- * If NULL is returned, the caller needs to check errno to make sure it's not
-- * caused by memory allocation failure.
-- */
--static char *find_option(const char *options, const char *option)
--{
--      const char *tmp;
--      char *ret;
--      int i;
--
--      errno = 0;
--      tmp = strstr(options, option);
--      if (!tmp)
--              return NULL;
--      ret = strdup(tmp);
--      if (!ret)
--              return NULL;
--      i = 0;
--      while (*(ret + i) && *(ret + i) != ',')
--              i++;
--      *(ret + i) = '\0';
--      return ret;
--}
--
- /* Match whitespace separator */
- static bool is_sep(char c)
- {
-@@ -542,44 +515,38 @@ static void parse_mntinfo_line(char *line, struct mnt_entry *ent)
- }
- 
- /*
-- * Compare the subvolume passed with the pathname of the directory mounted in
-- * btrfs. The pathname inside btrfs is different from getmnt and friends, since
-- * it can detect bind mounts to content from the inside of the original mount.
-+ * Call @cb for each btrfs mount in /proc/self/mountinfo, in order, with the
-+ * pathname inside the filesystem that is mounted (field 3, e.g. "/" for the
-+ * top level subvolume, "/vol" for a subvolume, "/vol/dir" for a bind mount of
-+ * a directory) and the mount point (field 4), both unmangled.  Iteration
-+ * stops when @cb returns non-zero, and that value is returned.
-+ *
-+ * Note that the mount options (subvol=, subvolid=) of a bind mount are those
-+ * of the original mount, only the pathname tells what is visible under it:
-  *
-- * Example:
-  *   # mount -o subvol=/vol /dev/sda2 /mnt
-  *   # mount --bind /mnt/dir2 /othermnt
-- *
-- *   # mounts
-- *   ...
-- *   /dev/sda2 on /mnt type btrfs (ro,relatime,ssd,space_cache,subvolid=256,subvol=/vol)
-- *   /dev/sda2 on /othermnt type btrfs (ro,relatime,ssd,space_cache,subvolid=256,subvol=/vol)
-- *
-  *   # cat /proc/self/mountinfo
-- *
-  *   38 30 0:32 /vol /mnt ro,relatime - btrfs /dev/sda2 ro,ssd,space_cache,subvolid=256,subvol=/vol
-  *   37 29 0:32 /vol/dir2 /othermnt ro,relatime - btrfs /dev/sda2 ro,ssd,space_cache,subvolid=256,subvol=/vol
-  *
-- * If we try to find a mount point only using subvol and subvolid from mount
-- * options we would get mislead to believe that /othermnt has the same content
-- * as /mnt.
-+ * Mounts of all btrfs filesystems are reported, callers must check which
-+ * filesystem a mount point belongs to.
-  *
-- * But, using mountinfo, we have the pathaname _inside_ the filesystem, so we
-- * can filter out the mount points with bind mounts which have different content
-- * from the original mounts, in this case the mount point with id 37.
-+ * Return 0 after the last mount, the non-zero value of @cb, or -errno.
-  */
--int find_mount_fsroot(const char *subvol, const char *subvolid, char **mount)
-+int iterate_btrfs_mounts(int (*cb)(const char *fsroot, const char *mnt, void *priv),
-+                       void *priv)
- {
-       FILE *mnt;
-       char *buf = NULL;
-       int bs = 4096;
-       int line = 0;
-       int ret = 0;
--      bool found = false;
- 
-       mnt = fopen("/proc/self/mountinfo", "r");
-       if (!mnt)
--              return -1;
-+              return -errno;
- 
-       buf = malloc(bs);
-       if (!buf) {
-@@ -596,62 +563,23 @@ int find_mount_fsroot(const char *subvol, const char *subvolid, char **mount)
- 
-               if (ch == '\n') {
-                       struct mnt_entry ent;
--                      char *opt;
--                      const char *value;
- 
-                       buf[line] = 0;
-+                      line = 0;
-                       parse_mntinfo_line(buf, &ent);
--
--                      /* Skip unrelated mounts */
-                       if (strcmp(ent.fstype, "btrfs") != 0)
--                              goto nextline;
--                      if (strlen(ent.root) != strlen(subvol))
--                              goto nextline;
--                      if (strcmp(ent.root, subvol) != 0)
--                              goto nextline;
--
--                      /*
--                       * Match subvolume by id found in mountinfo and
--                       * requested by the caller
--                       */
--                      opt = find_option(ent.options2, "subvolid=");
--                      if (opt == NULL && errno != 0) {
--                              ret = -errno;
--                              goto out;
--                      }
--                      if (!opt)
--                              goto nextline;
--                      value = opt + strlen("subvolid=");
--                      if (strcmp(value, subvolid) != 0) {
--                              free(opt);
--                              goto nextline;
--                      }
--                      free(opt);
--
--                      /*
--                       * First match is in most cases the original mount, not
--                       * a bind mount. In case there are no further bind
--                       * mounts, return what we found in @mount.  Any
--                       * following mount that matches by path and subvolume
--                       * id is a bind mount and we return the original mount.
--                       */
--                      if (found)
-+                              continue;
-+                      ret = cb(ent.root, ent.path, priv);
-+                      if (ret)
-                               goto out;
--                      found = true;
--                      *mount = strdup(ent.path);
--                      if (!*mount) {
--                              ret = -ENOMEM;
--                              goto out;
--                      }
--                      ret = 0;
--                      goto nextline;
-+                      continue;
-               }
-               /*
-                * Grow buffer if needed, there are 3 paths up to PATH_MAX and
-                * mount options are limited by page size. Often the overall
-                * line length does not exceed 256.
-                */
--              if (line >= bs) {
-+              if (line >= bs - 1) {
-                       char *tmp;
- 
-                       bs += 4096;
-@@ -663,9 +591,6 @@ int find_mount_fsroot(const char *subvol, const char *subvolid, char **mount)
-                       buf = tmp;
-               }
-               buf[line++] = ch;
--              continue;
--nextline:
--              line = 0;
-       } while (1);
- out:
-       free(buf);
-diff --git a/common/utils.h b/common/utils.h
-index 94f9405e..faab2303 100644
---- a/common/utils.h
-+++ b/common/utils.h
-@@ -69,7 +69,8 @@ const char *get_fs_exclop_name(int op);
- int check_arg_type(const char *input);
- int ask_user(const char *question);
- int lookup_path_rootid(int fd, u64 *rootid);
--int find_mount_fsroot(const char *subvol, const char *subvolid, char **mount);
-+int iterate_btrfs_mounts(int (*cb)(const char *fsroot, const char *mnt, void *priv),
-+                       void *priv);
- int find_mount_root(const char *path, char **mount_root);
- int get_df(int fd, struct btrfs_ioctl_space_args **sargs_ret);
- 
--- 
-2.47.3
-
diff --git a/topics/logical-resolve-fixes/0004-btrfs-progs-inspect-logical-resolve-fail-on-an-unres.patch b/topics/logical-resolve-fixes/0004-btrfs-progs-inspect-logical-resolve-fail-on-an-unres.patch
deleted file mode 100644 (file)
index 41d5288..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-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
-
index 0b30dd463e0082009df77ab9410b85c612becf1a..ef2c5dbc40b766bc2a672168b328a27b3e14d6d6 100644 (file)
@@ -1,9 +1,10 @@
 # Testing: logical-resolve-fixes
 
-Four patches on devel 9d01fb77 (btrfs-progs Issue #400):
-4bd84e5a mountinfo optional fields, 09299b6d arg_strtou64() base 0,
-35045fc7 subvolume lookup, 08cfeba2 unreachable reference = error (with
-the misc-tests/042 update).
+Three patches on devel 9d01fb77 (btrfs-progs Issue #400):
+1. 4bd84e5a mountinfo optional fields;
+2. fe46687a subvolume lookup;
+3. cb9e0be5 unreachable reference = error (with the misc-tests/042
+   update).
 
 Not a kernel bug: on the misc-next lane kernel `-P` (inode, offset, root)
 returns every expected reference in every case below.  Only the user
@@ -11,26 +12,35 @@ space step from (root, inode) to a path fails.
 
 Rig: ahive, kernel `7.3.0-rc7+ #7 SMP PREEMPT_DYNAMIC Wed Oct 28 21:00:00
 EDT 2026` (misc-next lane plus a debug knob, KASAN).  Builds compared:
-system v6.14, `/usr/local/btrfs-progs-exp` (stock v7.1), and the topic.
-The topic build was first devel 9d01fb77 plus the four patches
-(`/mnt/linux/progs-lr`, patches in `patches/`), then progs `testing`
-25b77be8 (devel + the 5 topics of that day); its matrix lines are identical
-to the first build's.  The ahive build was removed afterwards.
-Evidence: raid56-wh-harness `forensics/logical-resolve-20261029/`.
+system v6.14, `/usr/local/btrfs-progs-exp` (stock v7.1), and the topic,
+built in `/mnt/linux/progs-lr` (removed after each run).  Evidence:
+raid56-wh-harness `forensics/logical-resolve-20261029/`.
+
+Until 2026-10-30 the topic also had "btrfs-progs: accept hexadecimal and
+octal numbers in arg_strtou64() again" (09299b6d) as its patch 2.  Zygo
+dropped it ("It happened years ago and there have been no complaints
+since. I already work around it with shell $((0xf00))").  The rows marked
+"4-patch" ran with it; the last row of each test ran without it, with
+decimal addresses only.
 
 ## New tests
 
 | test | verifies | patch(es) | last result | date | progs | harness | evidence |
 |---|---|---|---|---|---|---|---|
-| `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 |
+| `logical-resolve-repro.sh` (matrix: layouts top, top with ".", top with a subvolume directory argument, 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; decimal addresses) | every reference resolves to the right file under the right filesystem; paths relative to the argument | 1-3 | 98 cases per build.  v6.14: 28/98 fully resolved; stock v7.1: 28/98.  Topic: 86/98; 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.  Every topic line is identical to the 4-patch run's | 2026-10-30 | v6.14, v7.1, testing 4ba66afa | b2dc5d3 | `run-ahive-testing-4ba66afa.txt` |
+| same, 4-patch (also a `hex` layout) | as above, plus `0x` addresses | 1-3 + hex | 99 cases: stock 28/99, topic 87/99; hex: stock `ERROR: 0xd00000 is not a valid numeric value`, topic 2/2 | 2026-10-30 | testing 25b77be8; earlier devel + 0001-0004 | 09b7609 | `run-ahive-testing-25b77be8.txt`, `run-ahive-mn759c6b78edf4.txt` |
+| same, 4-patch without the stderr patch | | | identical, except that the unreachable references printed to stdout with rc 0 | 2026-10-30 | devel + 0001-0003 of then | b863822 | README |
+| misc-tests `042-inspect-internal-logical-resolve` (updated by patch 3) | paths, and unreachable references with rc 1 | 3 | PASS, rc 0: 8 path lines, 4 unreachable references (@/snap1, @/vol1/snapshot1) with rc 1 on 4 offsets | 2026-10-30 | testing 4ba66afa | b2dc5d3 | `misc-042-results-testing-4ba66afa.txt` |
+| same, 4-patch | | | PASS, same results (testing 25b77be8; again on 14a5fdb4 after the line continuation fix) | 2026-10-30 | 25b77be8, 14a5fdb4 | 09b7609, e18a4ed | `misc-042-results-testing-{25b77be8,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 | `misc-042-results-testing-25b77be8.txt` |
+
+misc-tests 042 passes only decimal addresses.
 
 ## Existing tests
 
-Every test that runs an inspect-internal resolve or rootid command:
+Every test that runs an inspect-internal resolve or rootid command, run
+with the 4-patch topic (the dropped patch only widened number parsing;
+these tests pass decimal numbers):
 
 | test | last result | date | progs | evidence |
 |---|---|---|---|---|
@@ -43,20 +53,61 @@ liburing, which ahive did not have); `make all` and `TEST=...
 
 ## 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).
+- 2026-10-30 message rewrite (two subjects shortened) and a code change
+  in the stderr patch: the misc-tests/042 line continuation (collapsed
+  into tabs mid-line) is restored.  35045fc7 -> 54f49b27 (same tree),
+  08cfeba2 -> 224e9b1c (only test.sh differs, whitespace).  testing
+  3bc81a49 -> 14a5fdb4.
+- 2026-10-30 hex fix dropped: 54f49b27 -> fe46687a, 224e9b1c -> cb9e0be5
+  (replayed onto 4bd84e5a, messages, authorship and dates unchanged).  The
+  topic tree is the old one minus exactly 09299b6d's diff; testing
+  7e1edc1f -> 4ba66afa, the same difference.
 
 ## Full test suite
 
-Pending: a separate run of the whole btrfs-progs test suite on ahive
-(testing 3bc81a49, liburing installed) is in progress; results will be in
-raid56-wh-harness `forensics/progs-testsuite-20261030/`.
+The whole btrfs-progs test suite ran on `testing` 3bc81a49 (all six
+topics; built `--enable-experimental --disable-documentation`, every other
+feature on), with origin/devel 9d01fb77 built the same way as the
+control, on ahive's lane debug kernel `7.3.0-rc7+ #7 SMP PREEMPT_DYNAMIC
+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` 4ba66afa in two ways: it
+still had the arg_strtou64() hex patch that was dropped from
+logical-resolve-fixes, and the collapsed misc-tests/042 line that was
+since restored.
+
+| suite | pass | not run | fail |
+|---|---|---|---|
+| fsck | 73 | 0 | 0 |
+| fsck-lowmem | 73 | 0 | 0 |
+| mkfs | 39 | 8 | 0 |
+| misc | 70 | 3 | 0 |
+| cli | 24 | 0 | 0 |
+| convert | 20 | 7 | 0 |
+| fuzz | 10 | 1 | 0 |
+| libbtrfsutil | 38 unit tests OK | 0 | 0 |
+
+- Three tests failed on the first pass for environment reasons:
+  misc/056-subvolume-list-uuid and convert/021-uuid-fsid lacked
+  `uuidparse` / `uuidgen` (uuid-runtime was then installed), and
+  fuzz/010-simple-sb needed `btrfs-sb-mod`, which `make` does not build.
+  After the fixes all three pass on both testing and the devel control.
+- Not run, none of them a failure: the kernel has no reiserfs, ntfs3,
+  null_blk or dm-thin (convert 010-014, 022, 024; mkfs 017, 025, 030-033, 039;
+  misc 063); mkfs 040-remap-tree needs `btrfs check` support for
+  remap-tree, which devel lacks too; misc 035 is hard-coded not-run
+  upstream.  misc 065 needs a `make D=1` build and passed in one.
+- Kernel log over the whole run: no WARNING, BUG, KASAN, lockdep,
+  hung-task or Oops reports, taint 0; only the BTRFS warnings and errors
+  that the corruption tests provoke on purpose.
+- For this topic: misc/042-inspect-internal-logical-resolve passed (with the hex patch and the collapsed line; 042 on the current topic is in the table above).
 
 ## Not covered / open
 
-- Patch 2 restores base 0 for every arg_strtou64() caller, octal
-  included.  No cli-tests or misc-tests pass a number with a leading zero
-  to one (the only such tokens in them are a label and a file name); the
-  other callers were not exercised beyond the test suite.
+- Hexadecimal logical addresses are still rejected (defect 6, left alone
+  on purpose); use decimal or `$((0x...))`.
 - `-o` has no separate defect on devel: it resolves exactly what the
   plain command resolves in every case.
 - Bind mounts of directories inside a subvolume were tested only in the
index 39d4c432bbd3364bf447ba813edffa7e4f52bcde..0db6f2d5f2a263a215c0677d4c14592b68f3b3ac 100644 (file)
@@ -33,9 +33,44 @@ filesystem (expected).
 
 ## Full test suite
 
-Pending: a separate run of the whole btrfs-progs test suite on ahive
-(testing 3bc81a49) is in progress; results will be in raid56-wh-harness
-`forensics/progs-testsuite-20261030/`.
+The whole btrfs-progs test suite ran on `testing` 3bc81a49 (all six
+topics; built `--enable-experimental --disable-documentation`, every other
+feature on), with origin/devel 9d01fb77 built the same way as the
+control, on ahive's lane debug kernel `7.3.0-rc7+ #7 SMP PREEMPT_DYNAMIC
+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` 4ba66afa in two ways: it
+still had the arg_strtou64() hex patch that was dropped from
+logical-resolve-fixes, and the collapsed misc-tests/042 line that was
+since restored.
+
+| suite | pass | not run | fail |
+|---|---|---|---|
+| fsck | 73 | 0 | 0 |
+| fsck-lowmem | 73 | 0 | 0 |
+| mkfs | 39 | 8 | 0 |
+| misc | 70 | 3 | 0 |
+| cli | 24 | 0 | 0 |
+| convert | 20 | 7 | 0 |
+| fuzz | 10 | 1 | 0 |
+| libbtrfsutil | 38 unit tests OK | 0 | 0 |
+
+- Three tests failed on the first pass for environment reasons:
+  misc/056-subvolume-list-uuid and convert/021-uuid-fsid lacked
+  `uuidparse` / `uuidgen` (uuid-runtime was then installed), and
+  fuzz/010-simple-sb needed `btrfs-sb-mod`, which `make` does not build.
+  After the fixes all three pass on both testing and the devel control.
+- Not run, none of them a failure: the kernel has no reiserfs, ntfs3,
+  null_blk or dm-thin (convert 010-014, 022, 024; mkfs 017, 025, 030-033, 039;
+  misc 063); mkfs 040-remap-tree needs `btrfs check` support for
+  remap-tree, which devel lacks too; misc 035 is hard-coded not-run
+  upstream.  misc 065 needs a `make D=1` build and passed in one.
+- Kernel log over the whole run: no WARNING, BUG, KASAN, lockdep,
+  hung-task or Oops reports, taint 0; only the BTRFS warnings and errors
+  that the corruption tests provoke on purpose.
+- For this topic: mkfs/040-remap-tree did not run (see above), so the suite does not exercise `mkfs -O remap-tree`; misc/071-btrfstune-enable-remap-tree passed.
 
 ## Not covered / open
 
index a3cd1b1dd9bd29619c5a64d7639b910b0db3ba15..fee5f798b7fb757413475503a4fea385e80522ae 100644 (file)
@@ -61,9 +61,44 @@ series, not in this patch.
 
 ## Full test suite
 
-Pending: a separate run of the whole btrfs-progs test suite on ahive
-(testing 3bc81a49) is in progress; results will be in raid56-wh-harness
-`forensics/progs-testsuite-20261030/`.
+The whole btrfs-progs test suite ran on `testing` 3bc81a49 (all six
+topics; built `--enable-experimental --disable-documentation`, every other
+feature on), with origin/devel 9d01fb77 built the same way as the
+control, on ahive's lane debug kernel `7.3.0-rc7+ #7 SMP PREEMPT_DYNAMIC
+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` 4ba66afa in two ways: it
+still had the arg_strtou64() hex patch that was dropped from
+logical-resolve-fixes, and the collapsed misc-tests/042 line that was
+since restored.
+
+| suite | pass | not run | fail |
+|---|---|---|---|
+| fsck | 73 | 0 | 0 |
+| fsck-lowmem | 73 | 0 | 0 |
+| mkfs | 39 | 8 | 0 |
+| misc | 70 | 3 | 0 |
+| cli | 24 | 0 | 0 |
+| convert | 20 | 7 | 0 |
+| fuzz | 10 | 1 | 0 |
+| libbtrfsutil | 38 unit tests OK | 0 | 0 |
+
+- Three tests failed on the first pass for environment reasons:
+  misc/056-subvolume-list-uuid and convert/021-uuid-fsid lacked
+  `uuidparse` / `uuidgen` (uuid-runtime was then installed), and
+  fuzz/010-simple-sb needed `btrfs-sb-mod`, which `make` does not build.
+  After the fixes all three pass on both testing and the devel control.
+- Not run, none of them a failure: the kernel has no reiserfs, ntfs3,
+  null_blk or dm-thin (convert 010-014, 022, 024; mkfs 017, 025, 030-033, 039;
+  misc 063); mkfs 040-remap-tree needs `btrfs check` support for
+  remap-tree, which devel lacks too; misc 035 is hard-coded not-run
+  upstream.  misc 065 needs a `make D=1` build and passed in one.
+- Kernel log over the whole run: no WARNING, BUG, KASAN, lockdep,
+  hung-task or Oops reports, taint 0; only the BTRFS warnings and errors
+  that the corruption tests provoke on purpose.
+- For this topic: misc/058-replace-start-enqueue passed; no suite test uses `--abort-on-uncorrectable`.
 
 ## Not covered / open
 
index 74dc84bc2ed0adffee975560efba0011139c1f51..078d042a2778c14eb9ac586ef1442aaac27c82cb 100644 (file)
@@ -1,6 +1,6 @@
 From c6bdae69281400698579562f59ef003b323cf7f6 Mon Sep 17 00:00:00 2001
 From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
-Date: Fri, 30 Oct 2026 09:48:05 -0400
+Date: Fri, 30 Oct 2026 10:26:08 -0400
 Subject: [PATCH 0/2] btrfs-progs: scrub: leave the device limits alone without --limit
 To: linux-btrfs@vger.kernel.org
 
index 382ed3c27e37c2e0aa4ba69d6f61e21cc960a5f5..7015d15b5b2c40ecd54ef6aec0ea22f22ddef565 100644 (file)
@@ -53,13 +53,48 @@ itself failed).
 
 ## 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.
+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 4ba66afa (via 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
-(testing 3bc81a49) is in progress; results will be in raid56-wh-harness
-`forensics/progs-testsuite-20261030/`.
+The whole btrfs-progs test suite ran on `testing` 3bc81a49 (all six
+topics; built `--enable-experimental --disable-documentation`, every other
+feature on), with origin/devel 9d01fb77 built the same way as the
+control, on ahive's lane debug kernel `7.3.0-rc7+ #7 SMP PREEMPT_DYNAMIC
+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` 4ba66afa in two ways: it
+still had the arg_strtou64() hex patch that was dropped from
+logical-resolve-fixes, and the collapsed misc-tests/042 line that was
+since restored.
+
+| suite | pass | not run | fail |
+|---|---|---|---|
+| fsck | 73 | 0 | 0 |
+| fsck-lowmem | 73 | 0 | 0 |
+| mkfs | 39 | 8 | 0 |
+| misc | 70 | 3 | 0 |
+| cli | 24 | 0 | 0 |
+| convert | 20 | 7 | 0 |
+| fuzz | 10 | 1 | 0 |
+| libbtrfsutil | 38 unit tests OK | 0 | 0 |
+
+- Three tests failed on the first pass for environment reasons:
+  misc/056-subvolume-list-uuid and convert/021-uuid-fsid lacked
+  `uuidparse` / `uuidgen` (uuid-runtime was then installed), and
+  fuzz/010-simple-sb needed `btrfs-sb-mod`, which `make` does not build.
+  After the fixes all three pass on both testing and the devel control.
+- Not run, none of them a failure: the kernel has no reiserfs, ntfs3,
+  null_blk or dm-thin (convert 010-014, 022, 024; mkfs 017, 025, 030-033, 039;
+  misc 063); mkfs 040-remap-tree needs `btrfs check` support for
+  remap-tree, which devel lacks too; misc 035 is hard-coded not-run
+  upstream.  misc 065 needs a `make D=1` build and passed in one.
+- Kernel log over the whole run: no WARNING, BUG, KASAN, lockdep,
+  hung-task or Oops reports, taint 0; only the BTRFS warnings and errors
+  that the corruption tests provoke on purpose.
+- For this topic: cli/024-scrub-limit passed.
 
 ## Not covered / open
 
index c5bd25071796ef26f534e9bd98f317894560d8de..f261dd043b1f15f8c0eb3b1fb7d11d99aa551879 100644 (file)
@@ -1,6 +1,6 @@
 From 37cc6ecb63f75d08913183387116f1ea7ecc05e0 Mon Sep 17 00:00:00 2001
 From: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
-Date: Fri, 30 Oct 2026 09:48:05 -0400
+Date: Fri, 30 Oct 2026 10:26:08 -0400
 Subject: [PATCH 0/2] btrfs-progs: scrub: progress socket fixes
 To: linux-btrfs@vger.kernel.org
 
index 0263c2f05207f0bdabb094bd23441df3372dd07b..423edc908f2a000e6d866bbd4f56d21c761c4359 100644 (file)
@@ -45,9 +45,44 @@ as for scrub-limit-only-with-option.  Evidence: raid56-wh-harness
 
 ## Full test suite
 
-Pending: a separate run of the whole btrfs-progs test suite on ahive
-(testing 3bc81a49) is in progress; results will be in raid56-wh-harness
-`forensics/progs-testsuite-20261030/`.
+The whole btrfs-progs test suite ran on `testing` 3bc81a49 (all six
+topics; built `--enable-experimental --disable-documentation`, every other
+feature on), with origin/devel 9d01fb77 built the same way as the
+control, on ahive's lane debug kernel `7.3.0-rc7+ #7 SMP PREEMPT_DYNAMIC
+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` 4ba66afa in two ways: it
+still had the arg_strtou64() hex patch that was dropped from
+logical-resolve-fixes, and the collapsed misc-tests/042 line that was
+since restored.
+
+| suite | pass | not run | fail |
+|---|---|---|---|
+| fsck | 73 | 0 | 0 |
+| fsck-lowmem | 73 | 0 | 0 |
+| mkfs | 39 | 8 | 0 |
+| misc | 70 | 3 | 0 |
+| cli | 24 | 0 | 0 |
+| convert | 20 | 7 | 0 |
+| fuzz | 10 | 1 | 0 |
+| libbtrfsutil | 38 unit tests OK | 0 | 0 |
+
+- Three tests failed on the first pass for environment reasons:
+  misc/056-subvolume-list-uuid and convert/021-uuid-fsid lacked
+  `uuidparse` / `uuidgen` (uuid-runtime was then installed), and
+  fuzz/010-simple-sb needed `btrfs-sb-mod`, which `make` does not build.
+  After the fixes all three pass on both testing and the devel control.
+- Not run, none of them a failure: the kernel has no reiserfs, ntfs3,
+  null_blk or dm-thin (convert 010-014, 022, 024; mkfs 017, 025, 030-033, 039;
+  misc 063); mkfs 040-remap-tree needs `btrfs check` support for
+  remap-tree, which devel lacks too; misc 035 is hard-coded not-run
+  upstream.  misc 065 needs a `make D=1` build and passed in one.
+- Kernel log over the whole run: no WARNING, BUG, KASAN, lockdep,
+  hung-task or Oops reports, taint 0; only the BTRFS warnings and errors
+  that the corruption tests provoke on purpose.
+- For this topic: cli/024-scrub-limit passed; no suite test exercises the progress socket.
 
 ## Not covered / open