summaryrefslogtreecommitdiff
path: root/lib/btrfsutil
AgeCommit message (Collapse)Author
2023-03-30btrfstree: Change the NodeSource API so that it can do cachingLuke Shumaker
2023-03-30btrfstree: Divorce ReadNode from NodeExpectationsLuke Shumaker
2023-03-30tree-wide: Funnel all btrfstree.ReadNode[btrfsvol.LogicalAddr]() calls ↵Luke Shumaker
through btrfstree.NodeSource.ReadNode()
2023-03-28containers: Rethink the caching librariesLuke Shumaker
2023-03-23btrfs: Consider the generation when checking if a node owner is OKLuke Shumaker
2023-03-23btrfstree: Add a 'generation' argument the owner validationLuke Shumaker
Validating a node's owner properly requires the generation. But don't worry about actually doing it properly yet, just update the API first.
2023-03-23btrfsutil: RebuiltTree: Allow nodes with .Gen == .ParentGenLuke Shumaker
2023-03-23btrfstree: Fuss with the TreeWalk APILuke Shumaker
2023-03-21btrfstree: Move the implementations of methods to be on a separate tree objectLuke Shumaker
2023-03-21btrfsutil: OldRebuiltForrest: Move the implementations of methods to the treesLuke Shumaker
2023-03-20btrfsutil: OldRebuiltForrest: Add some doc commentsLuke Shumaker
2023-03-20btrfsutil: OldRebuiltForrest: Move .TreeLookup() down within the fileLuke Shumaker
2023-03-20btrfsutil: OldRebuiltForrest: Have .RebuiltTree take a ContextLuke Shumaker
2023-03-20btrfsutil: OldRebuiltForrest: Simplify the TreeSearchAll implementationLuke Shumaker
2023-03-19btrfstree: TreeRoot: Rename the member from TreeID to just IDLuke Shumaker
2023-03-19btrfstree: Have LookupTreeRoot take a ContextLuke Shumaker
2023-03-17btrfsutil: RebuiltForrest: Accept nil callbacksLuke Shumaker
2023-03-17rebuildnodes/btrees: Rename methods to make API structure clearerLuke Shumaker
2023-03-17containers: Add OptionalValue and OptionalNilLuke Shumaker
2023-03-17btrfsutil: Merge KeyIO in to RebuiltForrestLuke Shumaker
2023-03-17btrfsutil: OldRebuiltForrest: Hoist logic from .RebuiltTree to .rawTreeWalkLuke Shumaker
It's OK that for ROOT_TREE_OBJECTID it now calls btrfstree.LookupTreeRoot on `bt` instead of `bt.inner`, because LookupTreeRoot doesn't actually use that argument for ROOT_TREE_OBJECTID.
2023-03-17btrfsutil: OldRebuildForrest: Drop the Augment methodLuke Shumaker
2023-03-17tree-wide: s/TreePath/Path/gLuke Shumaker
btrfstree.TreePath stutters.
2023-03-17btrfsinspect: PrintLogicalSpace and PrintPhysicalSpace are unusedLuke Shumaker
2023-03-17rebuildtrees: Move item-data from btrfsutil.KeyIO to scanLuke Shumaker
2023-03-17btrfsutil: OldRebuiltForrest: Drop skinny pathsLuke Shumaker
This changes errors to not have a Path attached to them, only tracking their spans; and it changes the Paths from TreeWalk to only have the leaf node.
2023-03-17btrfsutil: OldRebuiltForrest: Move .addErrs() from the forrest to the treeLuke Shumaker
2023-03-17btrfsutil: OldRebuiltForrest: Don't use Paths when tracking errorsLuke Shumaker
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-17tree-wide: Turn on all revive linters (with exceptions)Luke Shumaker
2023-03-17tree-wide: Ensure that all packages have a doc commentLuke Shumaker
2023-03-15btrfsutil: OldRebuiltForrest: errors: Show key range instead of pathLuke Shumaker
2023-03-15btrfstree: Have errors include context of what was being searched forLuke Shumaker
2023-03-15btrfstree: Distinguish between tree-not-found and item-not-foundLuke Shumaker
2023-03-15btrfsutil: Rebuiltforrest: Update obsolete references to LRUCache in commentsLuke 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-15misc: btrfsutil: Shrink the size of GraphNodeLuke Shumaker
2023-03-14Expose node-lists as a thing on the CLILuke Shumaker
2023-03-14Factor out the device-scan loop from rebuildmappings in to btrfsutilLuke 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