Skip to content

Commit

Permalink
fix: chain of probe functions
Browse files Browse the repository at this point in the history
Adjust the order of probing once again:

* push up probes which have a strict magic match (xfs, extfs, squashfs,
  etc.), and for filesystems which are commonly used in Talos
* keep GPT after that, as it doesn't have strict magic, but still should
  come early enough before other probes
* ZFS has a very wide way of looking for a superblock, which might match
  ZFS at the end of the disk in a partition, while the disk is actually
  GPT, so keep it low (and it's only an optional extension)

See siderolabs/talos#10069

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
  • Loading branch information
smira committed Jan 13, 2025
1 parent a047647 commit 19464bf
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions blkid/internal/chain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,14 @@ func Default() Chain {
&ext.Probe3{},
&ext.Probe2{},
&vfat.Probe{},
&swap.Probe{},
&lvm2.Probe{},
&zfs.Probe{},
&iso9660.Probe{},
&squashfs.Probe{},
&talosmeta.Probe{},
&luks.Probe{},
&iso9660.Probe{},
&bluestore.Probe{},
// keep GPT last, as if GPT is overwritten with smaller filesystem image, it should be detected first
&gpt.Probe{},
&bluestore.Probe{},
&luks.Probe{},
&swap.Probe{},
&lvm2.Probe{},
&zfs.Probe{},
}
}

0 comments on commit 19464bf

Please sign in to comment.