Documentation
¶
Index ¶
- Variables
- func CanFSCK(fs any) error
- func DevicesFSCK(ctx context.Context, fs any, dl subDeviceLister) error
- func DevicesFormated(ctx context.Context, fs any, dl subDeviceLister) (bool, error)
- func HasFSCK(fs any) bool
- func IsCapable(ctx context.Context, t string) bool
- func Types() []string
- type BTRFS
- func (t BTRFS) Devices(ctx context.Context, dev string) ([]string, error)
- func (t BTRFS) Grow(ctx context.Context, dev, mountPoint string) error
- func (t BTRFS) IsCapable() bool
- func (t BTRFS) IsFormated(ctx context.Context, dev string) (bool, error)
- func (t BTRFS) MKFS(ctx context.Context, dev string, args []string) error
- func (t BTRFS) ProvisionMountOptions(ctx context.Context, dev, mountOptions string) error
- type CanFSCKer
- type DeviceLister
- type Ext2
- type Ext3
- type Ext4
- type FSCKer
- type Grower
- type I
- type IsCapabler
- type IsFormateder
- type MKFSer
- type MountOptionsProvisioner
- type SelfSizer
- type T
- func (t T) IsFileBacked() bool
- func (t T) IsMultiDevice() bool
- func (t T) IsNetworked() bool
- func (t T) IsReadOnly() bool
- func (t T) IsVirtual() bool
- func (t T) IsZero() bool
- func (t T) KillUsers(ctx context.Context, mnt string) error
- func (t T) Log() *plog.Logger
- func (t T) Mount(ctx context.Context, dev string, mnt string, options string) error
- func (t *T) SetLog(log *plog.Logger)
- func (t T) String() string
- func (t T) Type() string
- func (t T) Umount(ctx context.Context, mnt string) error
- type TMPFS
- type XFS
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotImplemented = errors.New("not implemented")
)
Functions ¶
func DevicesFormated ¶
Types ¶
type BTRFS ¶
type BTRFS struct{ T }
func (BTRFS) Grow ¶
Grow takes the device dev of the filesystem mounted at mountPoint up to the size of the device: a btrfs grows a device at a time, and only while it is mounted.
func (BTRFS) IsFormated ¶
IsFormated reports whether the device holds a btrfs, which "btrfs filesystem show" lists the devices of.
type DeviceLister ¶
DeviceLister is implemented by a filesystem that can span several devices, to tell the devices of the one on dev.
type Grower ¶
Grower is implemented by a filesystem that can be made larger in place, to fill the device it sits on. The device is enlarged first, so the filesystem is only ever asked to take up what is already there.
type I ¶
type I interface {
String() string
Type() string
IsZero() bool
IsNetworked() bool
IsReadOnly() bool
IsVirtual() bool
IsFileBacked() bool
IsMultiDevice() bool
Mount(context.Context, string, string, string) error
Umount(context.Context, string) error
KillUsers(context.Context, string) error
Log() *plog.Logger
SetLog(*plog.Logger)
}
type IsCapabler ¶
type IsCapabler interface {
IsCapable() bool
}
type IsFormateder ¶
type MountOptionsProvisioner ¶
type MountOptionsProvisioner interface {
ProvisionMountOptions(ctx context.Context, dev, mountOptions string) error
}
MountOptionsProvisioner is implemented by a filesystem whose mount options name a part of it to create when it is provisioned, as the subvolume of a btrfs.
type SelfSizer ¶
SelfSizer is implemented by a filesystem that holds its own size rather than taking the size of a device under it. A tmpfs is told how large to be, and has nothing below it to enlarge first, so it is resized in one step and in either direction.
type T ¶
type T struct {
// contains filtered or unexported fields
}
func (T) IsFileBacked ¶
func (T) IsMultiDevice ¶
func (T) IsNetworked ¶
func (T) IsReadOnly ¶
type TMPFS ¶
type TMPFS struct{ T }
func (TMPFS) SetSize ¶
SetSize changes how large the filesystem may grow.
A tmpfs holds its own size: there is no device under it to enlarge first, and no filesystem structure to rewrite, so one remount does it in either direction. Made smaller than what it already holds it keeps the pages and reports itself full, which the kernel allows and a caller asked for.