summaryrefslogtreecommitdiff
path: root/lib/btrfsutil/rebuilt_tree.go
AgeCommit message (Collapse)Author
2023-04-17btrfsutil: RebuiltForrest: Add a .RebuiltAddRoots() method, cmd/btrfs-rec: ↵Luke Shumaker
Add a --trees flag
2023-04-17btrfsutil: RebuiltTree: Dedup ownership errorsLuke Shumaker
2023-04-17btrfsutil: RebuiltTree: Properly track errors for the btrfstree.Tree APILuke Shumaker
2023-04-17btrfsutil: RebuiltTree: Don't have laxAncestors hide UUID errorsLuke Shumaker
2023-04-17btrfsutil: RebuiltTree: Fix potential infinite loop in RebuiltCOWDistanceLuke Shumaker
2023-04-17btrfsutil: RebuiltForrest: Add a lax-ancestor modeLuke Shumaker
2023-04-17btrfstree: Path.NodeExpectations(): Drop the ability to fail openLuke Shumaker
2023-04-16btrfsutil: RebuiltTree: TreeWalk: Touch upLuke Shumaker
- Go ahead and have .NodeExpectations fail closed. It shouldn't make a difference at this point, but being stricter here is better. - Add a sanity check that the walker hasn't disagreed from the nodeIndex. At the leafs, the sanity check on items.Load should detect this, but let's detect it earlier to make things easier to debug.
2023-04-16btrfsutil: RebuiltTree: Drop pointless `if`/indentationLuke Shumaker
2023-04-16btrfsutil: RebuiltForrest: Be lazier about calling .RebuiltAddRoot()Luke Shumaker
2023-04-15btrfsutil: RebuiltTree: Clean up lockingLuke Shumaker
2023-04-15Clean-up made possible by btrfsutil.RebuiltForrest implementing btrfs.ReadableFSLuke Shumaker
- rebuildtrees: Use .ForrestLookup instead of .RebuiltTree where possible - btrfsutil: noopRebuiltForrestCallbacks: Use only the generic btrfstree.Forrest API - btrfsutil: RebuiltForrest, RebuiltTree: Avoid unnecessarily reaching into forrest.inner - btrfsutil: RebuiltTree: Drop the .ReadItem() method; it duplicates .TreeLookup without benefit.
2023-04-13btrfsutil: RebuiltForrest: Naively implement the new btrfs.ReadableFS APILuke Shumaker
2023-04-13btrfsutil: RebuiltForrest.RebuiltTree(): Return errorsLuke Shumaker
2023-04-13btrfsutil: RebuiltForrest: Have the ancestor id-to-ptr map persistLuke Shumaker
2023-04-13btrfsutil: RebuiltForrest: readItem: Return a full btrfstree.ItemLuke Shumaker
2023-04-13btrfsutil: RebuiltTree: Track member interior nodes tooLuke Shumaker
2023-04-13btrfsutil: Graph: Track item sizesLuke Shumaker
2023-04-13btrfsutil: RebuiltTree: Be strict about which KPs to consider validLuke Shumaker
2023-04-13btrfsutil: RebuiltTree: Track the max-key for each path to a nodeLuke Shumaker
2023-04-13btrfsutil: RebuiltTree: Wrap leafToRoots in a structLuke Shumaker
The implication being that I plan on adding more members to the struct.
2023-04-13btrfsutil: RebuiltTree: Refactor .uncachedLeafToRoots()Luke Shumaker
2023-04-13btrfsutil: RebuiltForrest: Allow skipping the .AddedItem loopLuke Shumaker
2023-04-13Try to find misuses of textui.ProgressLuke Shumaker
- Add a runtime-check to Progress to notice if we deadlocked or forgot to call .Done(). - Add a runtime-check to Progress.Done() to panic if .Set() was never called (instead of the old behavior of deadlocking). - grep: Use `defer` when possible, to help remember to call .Done(). - grep: Always either call .Set() right away, or right before calling .Done().
2023-04-04btrfsutil: Rename unexported types to be clearer about which system they ↵Luke Shumaker
belong to - nodeInfo → oldRebuiltNodeInfo (old_rebuilt_forrest.go) - itemStats → rebuiltItemStats (rebuilt_tree.go) - rootStats → rebuiltRootStats (rebuilt_tree.go) - nodeScanner → nodeLister (listnodes.go) - nodeStats → nodeListStats (listnodes.go) - scanStats → devScanStats (scan.go)
2023-04-04btrfsutil: RebuiltTree.items: Simplify a touchLuke Shumaker
2023-04-04btrfsutil: Move the shared cache definitions from rebuilt_forrest.go to ↵Luke Shumaker
rebuilt_tree.go
2023-04-04btrfsutil: RebuiltTree: Have .items() take a bool instead of a funcLuke Shumaker
2023-04-04btrfsutil: RebuiltTree: Take better advantage of cache pinningLuke Shumaker
2023-04-04maps: Add HasKey and HaveAnyKeysInCommon functions, use themLuke Shumaker
2023-04-03btrfsutil: RebuiltTree: Fix a commentLuke Shumaker
2023-04-02btrfsutil: RebuiltTree: Update comments for the new cache interfaceLuke Shumaker
2023-03-28containers: Rethink the caching librariesLuke Shumaker
2023-03-23btrfsutil: RebuiltTree: Allow nodes with .Gen == .ParentGenLuke Shumaker
2023-03-17rebuildnodes/btrees: Rename methods to make API structure clearerLuke Shumaker
2023-03-17btrfsutil: Merge KeyIO in to RebuiltForrestLuke Shumaker
2023-03-15btrfsutil: Rebuiltforrest: Update obsolete references to LRUCache in commentsLuke Shumaker
2023-03-15tree-wide: Refer to item "slots" rather than "indexes"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-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