#36373 init: log resolved datadir path

ReviewabilityReviewsAgreementSize
#36373 LarryRuane init: log resolved datadir pathReady0Crickets6
  • Log the resolved canonical data directory path at node startup
  • Helps developers and node operators verify the actual underlying storage device used in saved debug logs
  • Ready to review
  • Reviewers can help decide whether to log the resolved path unconditionally or only when symlinks differ
  • No review verdicts recorded
  • No substantive review or approvals yet
  • Suggested avoiding a second log line when the resolved path matches the configured directory (l0rinc)
  • Asked whether this change is part of broader symlink improvements (l0rinc)
  • 6 lines added or modified outside tests
  • 0 lines added or modified in tests
  • 1 lines removed in total
  • 1 files, 1 commits
Utilities (logging, arguments, libraries)#59 of 59
P4 · user request
  • P4 because it only adds an informational startup log line for resolved storage paths
  • Provides minor diagnostic convenience when analyzing logs without affecting node behavior or stability
Reviewability: ReadyStalePaused
Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets
Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs.
Size: lines added or modified outside tests, then in tests; greener = smaller.

Goal

Logs the symlink-resolved canonical path of the active data directory during node startup logging. The resolved path is printed unconditionally on a separate line immediately following the configured data directory line.

Problem: When the data directory or its parent paths contain symlinks, startup logs only print the configured path. Users and developers analyzing saved debug.log files cannot verify the actual underlying storage device or directory used during that run.

Evidence of importance:

  • Author description: 'I've been testing a potential performance PR across different data directories (for example, SSD versus HDD). After each run, I save the debug.log file. It would be nice if the debug.log file showed which data directory was used for that run.'
  • Author description: 'If a script starts bitcoind (e.g., on an RPi with a whole infrastructure, like Umbrel or myNode), changing the startup command arguments may be inconvenient or not even possible. It's easy to change the default directory to be a symlink. But in that case, debug.log doesn't show where the actual data directory is located.'

Risk of a mistake: low. Touches only startup logging using standard filesystem canonicalization with an error code fallback.

Changed since the previous assessment: The new version unconditionally logs the 'Resolved data directory' line on every startup instead of only printing it when the canonical path differs from the configured path, ensuring log parsers can rely on the line being present.

Reviewability

Ready

Nothing known that would invalidate a review now.

Waiting on (from the thread read):

  • reviewer: input from reviewers on whether logging the resolved datadir line should be conditional or always printed 2026-10-08

Agreement

Crickets

no substantive comment either way

Thread notes: Initial review by l0rinc questioned scope and suggested avoiding duplicate log lines when paths match. The author clarified scope and is awaiting further reviewer feedback before deciding whether to make the log line conditional.

Objections, suggestions, and questions:

ReviewerTypeHarm, request, or questionStatusMust beAuthor repliedQuote
l0rinc (member)question, scopeasks if this is part of a broader effort to improve symlink supportanswered · author replied that it is a self-contained PR, not part of a broader effortansweredyes2026-10-08: 'Is this part of a broader effort to improve symlink support?'
Status from: 2026-10-08: LarryRuane: 'No, I'm not thinking this is part of a broader effort to improve symlink support.'
l0rinc (member)suggestion, interfaceavoid logging two separate lines for the same directory when it is not a symlinkanswered · author explained the scripting rationale, stated openness to making it conditional, and asked to wait for more opinionsansweredyes2026-10-08: 'I wouldn't want to see two separate log lines for the exact same folder in 99% of cases.'
Status from: 2026-10-08: LarryRuane: 'I can make the logging of that Resolved line conditional so it doesn't print the same path as the Using line, maybe I'll wait for a few more opinions.'

Participants:

  • l0rinc (member, question, 1 statements 2026-10-08 to 2026-10-08): asked whether this is part of broader symlink support and preferred not having redundant log lines

Files

0 lines under test/bench/ci.

  • src/init/common.cpp +6/-1

Card

The short text the ranking pass compares across PRs.

Logs the symlink-resolved canonical data directory during node startup immediately after the configured path. This makes saved debug.log files reflect the physical storage directory used when running bitcoind via symlinked paths. The author notes this assists benchmarking across different storage media when wrapper scripts prevent modifying startup flags. No dependencies.

Data

dossier JSON · extract JSON · model ledger, generated 2026-10-09T01:20, confidence high, input hash 00b7c5793be2bea1
thread read through 2026-10-08 (2 statements), head 21e37651cc
labels: none

Categories

Utilities (logging, arguments, libraries)

P4 · user request

Adds an informational startup log line displaying the resolved canonical datadir path. While convenient for analyzing debug logs when symlinks are involved ('shows which data directory was used for that run'), it is a minor diagnostic logging improvement with no effect on node behavior or stability.

Membership: Touches node startup logging in src/init/common.cpp by logging the symlink-resolved data directory path.

Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 0