zfs

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package zfs probes ZFS filesystems.

Index

Constants

View Source
const ZFSUB_SIZE = 41

ZFSUB_SIZE is the size of the ZFSUB struct.

Variables

This section is empty.

Functions

This section is empty.

Types

type Probe

type Probe struct{}

Probe for the filesystem.

func (*Probe) Magic

func (p *Probe) Magic() []*magic.Magic

Magic returns the magic value for the filesystem.

func (*Probe) Name

func (p *Probe) Name() string

Name returns the name of the filesystem.

func (*Probe) Probe

func (p *Probe) Probe(r probe.Reader, _ magic.Magic) (*probe.Result, error)

Probe runs the further inspection and returns the result if successful.

type ZFSUB

type ZFSUB []byte

ZFSUB is a byte slice representing the zfs.h C header.

func (ZFSUB) Get_ub_guid_sum

func (s ZFSUB) Get_ub_guid_sum() uint64

Get_ub_guid_sum returns sum of all vdev guids.

func (ZFSUB) Get_ub_magic

func (s ZFSUB) Get_ub_magic() uint64

Get_ub_magic returns UBERBLOCK_MAGIC.

func (ZFSUB) Get_ub_rootbp

func (s ZFSUB) Get_ub_rootbp() byte

Get_ub_rootbp returns MOS objset_phys_t.

func (ZFSUB) Get_ub_timestamp

func (s ZFSUB) Get_ub_timestamp() uint64

Get_ub_timestamp returns UTC time of last sync.

func (ZFSUB) Get_ub_txg

func (s ZFSUB) Get_ub_txg() uint64

Get_ub_txg returns txg of last sync.

func (ZFSUB) Get_ub_version

func (s ZFSUB) Get_ub_version() uint64

Get_ub_version returns SPA_VERSION.

func (ZFSUB) Put_ub_guid_sum

func (s ZFSUB) Put_ub_guid_sum(v uint64)

Put_ub_guid_sum sets sum of all vdev guids.

func (ZFSUB) Put_ub_magic

func (s ZFSUB) Put_ub_magic(v uint64)

Put_ub_magic sets UBERBLOCK_MAGIC.

func (ZFSUB) Put_ub_rootbp

func (s ZFSUB) Put_ub_rootbp(v byte)

Put_ub_rootbp sets MOS objset_phys_t.

func (ZFSUB) Put_ub_timestamp

func (s ZFSUB) Put_ub_timestamp(v uint64)

Put_ub_timestamp sets UTC time of last sync.

func (ZFSUB) Put_ub_txg

func (s ZFSUB) Put_ub_txg(v uint64)

Put_ub_txg sets txg of last sync.

func (ZFSUB) Put_ub_version

func (s ZFSUB) Put_ub_version(v uint64)

Put_ub_version sets SPA_VERSION.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL