summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-15btrfs: io3_btree.go: De-nest populateTreeUUIDsLuke Shumaker
2023-03-15btrfs: io3_btree.go: Organize the fileLuke Shumaker
2023-03-15btrfsutil: OldRebuiltForrest: Fuss with indentation in rawTreeWalkLuke Shumaker
2023-03-15btrfsutil: OldRebuiltForrest: Pull the cbs.Item nil check out of the loopLuke Shumaker
2023-03-15tree-wide: Refer to item "slots" rather than "indexes"Luke Shumaker
2023-03-15tree-wide: Have "interior" rather than "internal" be the antonym of "leaf"Luke Shumaker
Because "internal" has a meaning in the Go world, and it's confusing.
2023-03-15btrfstree: Fix commentsLuke Shumaker
2023-03-15misc: btrfsutil: Shrink the size of GraphNodeLuke Shumaker
2023-03-14Merge branch 'lukeshu/repro'Luke Shumaker
2023-03-14btrfs: Have "missing by-name direntry" errors be in a stable orderLuke Shumaker
2023-03-14Merge branch 'lukeshu/reorg-cli'Luke Shumaker
2023-03-14cmd/btrfs-rec: inspect rebuild-mappings list-nodes: Set up logging and stuffLuke Shumaker
2023-03-14Expose node-lists as a thing on the CLILuke Shumaker
2023-03-14cmd/btrs-rec: Rename 'inspect rebuild-nodes'→'inspect rebuild-trees'Luke Shumaker
2023-03-14cmd/btrfs-rec: Fix newlines in `inspect rebuild-mappings --help`Luke Shumaker
2023-03-14cmd/btrfs-rec: Smash scandevices and rebuild-mappings togetherLuke Shumaker
2023-03-14cmd/btrfs-rec: Don't require --pv for `help`Luke Shumaker
2023-03-14cmd/btrfs-rec: Have each subcommand call runWithRawFS itselfLuke Shumaker
2023-03-14cmd/btrfs-rec: Factor out a `runWithRawFS` functionLuke Shumaker
2023-03-14tree-wide: Don't pass around a full rebuildmappings.ScanDevicesResult when a ↵Luke Shumaker
simple list of nodes will do
2023-03-14Factor out the device-scan loop from rebuildmappings in to btrfsutilLuke Shumaker
2023-03-14Merge branch 'lukeshu/reorg'Luke Shumaker
2023-03-14Update log field names to reflect new file/package namesLuke Shumaker
2023-03-14Update error messages to reflect new file/package namesLuke Shumaker
2023-03-14Update identifiers and comments to reflect new file/package namesLuke Shumaker
2023-03-14Get it to compile with the renamed filesLuke Shumaker
#!/bin/bash set -e git ls-files :*.go :!tools/| while read -r file; do pkgname=${file%/*.go} pkgname=${pkgname##*/} if [[ "$pkgname" == btrfs-rec ]]; then pkgname=main fi sed -i "s/^package [^_]*/package ${pkgname}/" "$file" done # btrfsutil #################################################################### gofmt -w -r 'rebuildnodes -> rebuildtrees' cmd lib gofmt -w -r 'btrees -> btrfsutil' cmd lib gofmt -w -r 'keyio -> btrfsutil' cmd lib sed -i 's/func New/func NewGraph/' lib/btrfsutil/graph.go gofmt -w -r 'graph.New -> btrfsutil.NewGraph' cmd lib gofmt -w -r 'graph.Graph -> btrfsutil.Graph' cmd lib sed -i -e '/\/graph"/d' -e 's/pkggraph\.//' lib/btrfsutil/rebuilt_forrest.go gofmt -w -r 'btrfsutil.BrokenForrest -> BrokenForrest ' lib/btrfsutil gofmt -w -r 'btrfsutil.Handle -> Handle ' lib/btrfsutil gofmt -w -r 'btrfsutil.Graph -> Graph ' lib/btrfsutil gofmt -w -r 'btrfsutil.ItemPtr -> ItemPtr ' lib/btrfsutil gofmt -w -r 'Handle -> KeyIO' lib/btrfsutil gofmt -w -r 'btrfsutil.Handle -> btrfsutil.KeyIO' cmd/btrfs-rec/inspect/rebuildtrees/ gofmt -w -r 'NewHandle -> NewKeyIO' cmd lib # rebuildmappings ############################################################## gofmt -w -r 'btrfsinspect.DumpTrees -> dumptrees.DumpTrees' cmd lib gofmt -w -r 'btrfsinspect.MountRO -> mount.MountRO' cmd lib gofmt -w -r 'btrfsinspect.ScanDevices -> rebuildmappings.ScanDevices' cmd lib gofmt -w -r 'btrfsinspect.ScanDevicesResult -> rebuildmappings.ScanDevicesResult' cmd lib gofmt -w -r 'btrfsinspect.SysExtentCSum -> rebuildmappings.SysExtentCSum' cmd lib gofmt -w -r 'rebuildmappings.IndexAll -> IndexAll ' cmd/btrfs-rec/inspect/rebuildmappings gofmt -w -r 'rebuildmappings.ScanDevicesResult -> ScanDevicesResult ' cmd/btrfs-rec/inspect/rebuildmappings gofmt -w -r 'rebuildmappings.SysExtentCSum -> SysExtentCSum ' cmd/btrfs-rec/inspect/rebuildmappings # btrfscheck ################################################################### sed -i -e 's/func handle/func Handle/' lib/btrfscheck/graph.go sed -i 's/handle/btrfscheck.Handle/g' cmd/btrfs-rec/inspect/rebuildtrees/rebuild.go gofmt -w -r 'fsErr -> FSErr ' lib/btrfscheck cmd/btrfs-rec/inspect/rebuildtrees gofmt -w -r 'want -> Want ' lib/btrfscheck cmd/btrfs-rec/inspect/rebuildtrees gofmt -w -r 'wantOff -> WantOff ' lib/btrfscheck cmd/btrfs-rec/inspect/rebuildtrees gofmt -w -r 'wantDirIndex -> WantDirIndex ' lib/btrfscheck cmd/btrfs-rec/inspect/rebuildtrees gofmt -w -r 'wantCSum -> WantCSum ' lib/btrfscheck cmd/btrfs-rec/inspect/rebuildtrees gofmt -w -r 'wantFileExt -> WantFileExt ' lib/btrfscheck cmd/btrfs-rec/inspect/rebuildtrees # generic imports ############################################################## replace() { git grep -l "$1"|xargs -r sed -i "s,$1,$2,g" } replace 'lib/btrfsprogs/btrfsinspect/rebuildmappings"' 'cmd/btrfs-rec/inspect/rebuildmappings"' replace 'lib/btrfsprogs/btrfsinspect/rebuildnodes"' 'cmd/btrfs-rec/inspect/rebuildtrees"' replace 'lib/btrfsprogs/btrfsutil"' 'lib/btrfsutil"' goimports -w cmd lib ./tools/bin/golangci-lint run --fix ./... And then touch-up copyright statements by hand.
2023-03-14Move files around [ci-skip]Luke Shumaker
2023-03-14Merge branch 'lukeshu/fix-lsfiles'Luke Shumaker
2023-03-14fixup! btrfstree: Add a FreeNodeRef function, use itLuke Shumaker
2023-03-14cmd/btrfs-rec: inspect ls-files: Fix grammar in an error messageLuke Shumaker
2023-03-14cmd/btrfs-rec: inspect ls-files: Also send panics to stderrLuke Shumaker
2023-03-14Merge branch 'lukeshu/minor'Luke Shumaker
2023-03-14rebuildnodes: Turn the logging down a bitLuke Shumaker
2023-03-14scripts/main.sh: Go ahead and allow ls-file sand ls-trees to runLuke Shumaker
This will be useful for regression-testing.
2023-03-02Merge branch 'lukeshu/rebuild-nodes-take6'Luke Shumaker
2023-03-02Shorten the log lines if < LogLevelDebugLuke Shumaker
2023-02-28rebuildnodes: Fix a data raceLuke Shumaker
Calling FreeNodeRef while an item from that node is still in use is a BAD TIME.
2023-02-27rebuildnodes: Don't bother with retries if nothing changedLuke Shumaker
2023-02-27Upgrade lowmemjsonLuke Shumaker
2023-02-13Merge branch 'lukeshu/rebuild-nodes-take5'Luke Shumaker
2023-02-13rebuildnodes/btrees: slices.RemoveAllFunc mutates the source sliceLuke Shumaker
2023-02-13rebuildnodes/graph: Fix typo in a commentLuke Shumaker
2023-02-12rebuildnodes: Load nodes in orderLuke Shumaker
Should speed things up, and should fix some determinism issues.
2023-02-12rebuildnodes/btrees: Have the concurrency story for .trees make more senseLuke Shumaker
2023-02-12rebuildnodes/btrees: Move cache-flush code from tree.go to forrest.goLuke Shumaker
2023-02-12rebuildnodes/btrees: Fuss with loggingLuke Shumaker
2023-02-12rebuildnodes: Don't deadlock if the cpu goroutine panicsLuke Shumaker
2023-02-12rebuildnodes: Add a settle-items stepLuke Shumaker
2023-02-12rebuildnodes: rebuild.go: Tidy upLuke Shumaker
2023-02-12rebuildnodes/btrees: Take a Callbacks interface, instead of func pointersLuke Shumaker