diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-14 21:38:37 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-14 21:40:49 -0600 |
commit | 72b86f4fa218c4425cfe70f8e800cb7152c83b5e (patch) | |
tree | b700e2a5f0a576745c98d5e0be0556f1270730cf /lib/btrfs | |
parent | 697d79fb12b79b65a501ec90dbb45ea165b3457d (diff) |
btrfs: Have "missing by-name direntry" errors be in a stable order
Diffstat (limited to 'lib/btrfs')
-rw-r--r-- | lib/btrfs/io4_fs.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/btrfs/io4_fs.go b/lib/btrfs/io4_fs.go index 56cf266..749b2de 100644 --- a/lib/btrfs/io4_fs.go +++ b/lib/btrfs/io4_fs.go @@ -292,7 +292,8 @@ func (dir *Dir) populate() { } entriesWithIndexes := make(containers.Set[string]) nextIndex := uint64(2) - for index, entry := range dir.ChildrenByIndex { + for _, index := range maps.SortedKeys(dir.ChildrenByIndex) { + entry := dir.ChildrenByIndex[index] if index+1 > nextIndex { nextIndex = index + 1 } |