tar2ext4

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 15 Imported by: 137

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendDMVerity added in v0.9.0

func AppendDMVerity(p *params)

AppendDMVerity instructs the converter to add a dmverity merkle tree for the ext4 filesystem after the filesystem and before the optional VHD footer

func AppendVhdFooter

func AppendVhdFooter(p *params)

AppendVhdFooter instructs the converter to add a fixed VHD footer to the file.

func Convert

func Convert(r io.Reader, w io.ReadWriteSeeker, options ...Option) error

Convert writes a compact ext4 file system image that contains the files in the input tar stream.

func ConvertWhiteout

func ConvertWhiteout(p *params)

ConvertWhiteout instructs the converter to convert OCI-style whiteouts (beginning with .wh.) to overlay-style whiteouts.

func InlineData

func InlineData(p *params)

InlineData instructs the converter to write small files into the inode structures directly. This creates smaller images but currently is not compatible with DAX.

func ReadExt4SuperBlock added in v0.8.16

func ReadExt4SuperBlock(vhdPath string) (*format.SuperBlock, error)

ReadExt4SuperBlock reads and returns ext4 super block from VHD

The layout on disk is as follows: | Group 0 padding | - 1024 bytes | ext4 SuperBlock | - 1 block | Group Descriptors | - many blocks | Reserved GDT Blocks | - many blocks | Data Block Bitmap | - 1 block | inode Bitmap | - 1 block | inode Table | - many blocks | Data Blocks | - many blocks

More details can be found here https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout

Our goal is to skip the Group 0 padding, read and return the ext4 SuperBlock

Types

type Option

type Option func(*params)

Option is the type for optional parameters to Convert.

func MaximumDiskSize added in v0.7.8

func MaximumDiskSize(size int64) Option

MaximumDiskSize instructs the writer to limit the disk size to the specified value. This also reserves enough metadata space for the specified disk size. If not provided, then 16GB is the default.

Jump to

Keyboard shortcuts

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