summaryrefslogtreecommitdiff
path: root/cmd/btrfs-rec/inspect_lstrees.go
AgeCommit message (Collapse)Author
2023-03-17containers: Add OptionalValue and OptionalNilLuke Shumaker
2023-03-17tree-wide: s/TreePath/Path/gLuke Shumaker
btrfstree.TreePath stutters.
2023-03-17btrfstree: Have ReadNode return a *Node rather than a *diskio.Ref[Addr, Node]Luke Shumaker
... and take a ReaderAt instead of a diskio.File.
2023-03-14Expose node-lists as a thing on the CLILuke Shumaker
2023-03-14cmd/btrfs-rec: Smash scandevices and rebuild-mappings togetherLuke Shumaker
2023-03-14cmd/btrfs-rec: Have each subcommand call runWithRawFS itselfLuke 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-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-01-05cmd/btrfs-rec: Fix capitalization typo in commentsLuke Shumaker
2023-01-01lint: Set exclude-use-default=falseLuke Shumaker
2023-01-01lint: Turn on gomndLuke Shumaker
2023-01-01lint: Turn on gocriticLuke Shumaker
2022-12-26cmd/btrfs-rec: Add a utility function for reading JSON files with progressLuke Shumaker
2022-12-26tree-wide: Audit for fmt.Fprint usage, in favor of textuiLuke Shumaker
2022-12-26tree-wide: Outlaw fmt.Print, force textuiLuke Shumaker
2022-10-05fix ls-trees lost+foundLuke Shumaker
2022-09-05Try to uniformly use containers.SetLuke Shumaker
2022-08-28btrfs: Split off btrfstree and btrfsprim sub-packagesLuke Shumaker
2022-08-28btrfs: Rethink the ReadNode API to better encourage sanity checkingLuke Shumaker
2022-08-17rename: Rename "ScanOneDev"→"ScanOneDevice"Luke Shumaker
2022-07-25ls-trees: Add an option to include lost+found nodesLuke Shumaker
2022-07-13Move the remaining former-generic.go parts out of lib/util/Luke Shumaker
2022-07-13Have TreeWalk be cancelableLuke Shumaker
2022-07-12check for bad itemsLuke Shumaker
Big indentation change in print_tree.go; small actual change.
2022-07-12Don't include the offset and size in btrfs.ItemLuke Shumaker
2022-07-12Don't let TreeWalk bail early, add TreeID in to TreePathLuke Shumaker
2022-07-11Move all of the small-ish tools to be part of btrfs-recLuke Shumaker