Documentation ¶
Overview ¶
Package blockdevicelib has a comment to make the linter happy.
Package blockdevicelib has a comment to make the linter happy.
Index ¶
- Constants
- type Catalog
- type Catalog_entry
- type Catalog_list
- type Lbd_config
- type Lbd_device
- type Lbd_lib
- func (this *Lbd_lib) Dump_block(cat *Catalog, device_name string, block_num uint32) tools.Ret
- func (this *Lbd_lib) Dump_block_header(cat *Catalog, device_name string, block_num uint32) tools.Ret
- func (this *Lbd_lib) Dump_header(cat *Catalog, device_name string) tools.Ret
- func (this *Lbd_lib) Get_config_file() string
- func (this *Lbd_lib) Get_log() *tools.Nixomosetools_logger
- func (this *Lbd_lib) Make_stree(device *Lbd_device) (tools.Ret, *stree_v_lib.Stree_v)
- func (this *Lbd_lib) New_block_device(device_name string, size uint64, local_storage_file string, directio bool, ...) *Lbd_device
- func (this *Lbd_lib) New_block_device_from_catalog_entry(catentry *Catalog_entry) *Lbd_device
- func (this *Lbd_lib) Run(root_cmd *cobra.Command, data_pipeline *list.List) tools.Ret
- func (this *Lbd_lib) Set_log(l *tools.Nixomosetools_logger)
- func (this *Lbd_lib) Start_stree(s *stree_v_lib.Stree_v, force bool) tools.Ret
- func (this *Lbd_lib) Startup(default_config_file string, default_log_file string, ...) (tools.Ret, *cobra.Command)
Constants ¶
View Source
const CMD_CATALOG = "catalog"
View Source
const CMD_CATALOG_ENTRY = "catalog-entry"
View Source
const CMD_CATALOG_LIST = "catalog-list"
View Source
const CMD_CREATE_BLOCK_DEVICE = "create-device"
View Source
const CMD_DESTROY_ALL_BLOCK_DEVICES = "destroy-all-devices"
View Source
const CMD_DESTROY_BLOCK_DEVICE = "destroy-device"
View Source
const CMD_DEVICE_STATUS = "device-status"
View Source
const CMD_DIAG = "diag"
View Source
const CMD_EXCLUDE = "exclude"
View Source
const CMD_INCLUDE = "include"
View Source
const CMD_SET = "set"
View Source
const CMD_STORAGE_STATUS = "storage-status"
View Source
const DEFAULT_NODE_VALUE_SIZE = 64 * 1024 // 64k
View Source
const ONE_MEG = (1024 * 1024)
View Source
const PHYSICAL_BLOCK_SIZE = 4096
View Source
const SUB_CMD_CATALOG_ADD = "add"
View Source
const SUB_CMD_CATALOG_DELETE = "delete"
View Source
const SUB_CMD_CATALOG_LIST = "list"
View Source
const SUB_CMD_CATALOG_START = "start" // by name
View Source
const SUB_CMD_CATALOG_STOP = "stop"
View Source
const SUB_CMD_DUMP = "dump"
View Source
const SUB_CMD_DUMP_BLOCK = "block"
View Source
const SUB_CMD_DUMP_BLOCK_HEADER = "blockheader"
View Source
const SUB_CMD_DUMP_HEADER = "header"
View Source
const TIMEOUT_IN_SECONDS = 1200
View Source
const TXT_ADDITIONAL_NODES_PER_BLOCK = "additional-nodes-per-block"
View Source
const TXT_ALIGNMENT = "alignment"
View Source
const TXT_ALL = "all"
View Source
const TXT_AM = "Am"
View Source
const TXT_DEFAULT_CONTROL_DEVICE = TXT_DEVICE_PATH_PREFIX + "zosbd2ctl"
View Source
const TXT_DEVICE_NAME = "device-name"
View Source
const TXT_DEVICE_PATH_PREFIX = "/dev/"
View Source
const TXT_DEVICE_RAMDISK = "device-ramdisk"
View Source
const TXT_DEVICE_SIZE = "device-size"
View Source
const TXT_DIRECTIO = "directio"
View Source
const TXT_DRAGONS = "here-be-dragons"
View Source
const TXT_FORCE = "force"
View Source
const TXT_I = "I"
View Source
const TXT_MOUNT = "mount"
View Source
const TXT_MOUNTPOINT = "mountpoint"
View Source
const TXT_MOUNT_CMD = "mount"
View Source
const TXT_NODE_VALUE_SIZE = "node-value-size" // provided by user in how much data they want in one mother node
View Source
const TXT_ROOT = "root"
View Source
const TXT_ROOT_UID = "0"
View Source
const TXT_STORAGE_FILE = "storage-file"
View Source
const TXT_STREE_RAMDISK = "stree-ramdisk"
View Source
const TXT_SURE = "Sure"
View Source
const TXT_SYNC = "sync"
View Source
const TXT_UMOUNT_CMD = "umount"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
func New_catalog ¶
func New_catalog(log *tools.Nixomosetools_logger, catalog_file string) *Catalog
func (*Catalog) Write_catalog ¶
type Catalog_entry ¶
type Catalog_entry struct { // settings for the device Device_name string Size uint64 // in bytes Local_storage_file string // backing store sizing information // do you want to use O_DIRECT Directio bool // do you want to use O_SYNC Sync bool /* if using directio this must be a multiple of 4k for reads and writes to work. you can make it largers but you'd just be wasting space. If not using directio you can make this the stree_block_size to perfectly line up stree nodes back to back with zero waste. As this will create unaligned reads and writes to the back end it will suffer a performance penalty, but not using directio will get you page caching so it actually goes faster than directio. until we start flushing. */ Alignment uint32 /* this is the number of bytes of data the user wants to be able to store in a mother node. the calculated size is the actual size we're going to create a node size of which includes the header based on the key size and the value size and other mother node header information */ Node_value_size_bytes uint32 /* this is the size of a single node in stree, for example a mother node or an offpsring node. This is the smallest size an stree block of data can be stored in, if for example you were to compress it. */ Node_calculated_size_bytes uint32 /* you always get one mother node to store user data in (of size node_value_size_bytes) this is how many additional nodes you want to use to make up an stree tree node entry. (additional_nodes_per_block + 1) * node_value_size_bytes is the largest amount of data you can store in an stree tree node. if it were to compress well, you would actually only need a minimum of 1 node (of node_value_size_bytes bytes) to store it in if for example it compressed well, or you only wrote a little bit of data into it. */ Additional_nodes_per_block uint32 // Mount bool // should we try and mount after "catalog start", and similarly unmount on "catalog stop" Mountpoint string // where we should mount it Exclude_from_start_all bool // by default we include all catalog entries when we say start all }
func New_catalog_entry_from_device ¶
func New_catalog_entry_from_device(device *Lbd_device) Catalog_entry
type Catalog_list ¶
type Catalog_list struct {
Device_list map[string]*Catalog_entry // map of case preserved device_name to device definition.
}
func New_catalog_list ¶
func New_catalog_list() *Catalog_list
type Lbd_config ¶
type Lbd_config struct { Log logfields Zosbd2 zosbd2fields Catalog catalogfields }
type Lbd_device ¶
type Lbd_device struct { // settings for the device Device_name string Size uint64 Local_storage_file string Directio bool Sync bool Alignment uint32 // if directio is false this should be the stree_block_size Stree_value_size uint32 // this is the number of bytes of user data we store in a mother node Stree_calculated_node_size uint32 // this is the calculated size including the key and value size and other per-node header information Additional_nodes_per_block uint32 Mount bool // should we try and mount after "catalog start", and similarly unmount on "catalog stop" Mountpoint string // where we should mount it Exclude_from_start_all bool // by default we start all devices for start --all unless this is set. // contains filtered or unexported fields }
func (*Lbd_device) Get_node_size_in_bytes ¶
func (this *Lbd_device) Get_node_size_in_bytes() uint32
type Lbd_lib ¶
type Lbd_lib struct { Config_file string Log_file string Log_level uint32 // contains filtered or unexported fields }
func (*Lbd_lib) Dump_block ¶
func (*Lbd_lib) Dump_block_header ¶
func (*Lbd_lib) Dump_header ¶
func (*Lbd_lib) Get_config_file ¶
func (*Lbd_lib) Get_log ¶
func (this *Lbd_lib) Get_log() *tools.Nixomosetools_logger
func (*Lbd_lib) Make_stree ¶
func (this *Lbd_lib) Make_stree(device *Lbd_device) (tools.Ret, *stree_v_lib.Stree_v)
func (*Lbd_lib) New_block_device ¶
func (this *Lbd_lib) New_block_device(device_name string, size uint64, local_storage_file string, directio bool, sync bool, alignment uint32, stree_value_size uint32, calculated_stree_node_size uint32, additional_nodes_per_block uint32, mount bool, mountpoint string, device_ramdisk bool, stree_ramdisk bool) *Lbd_device
func (*Lbd_lib) New_block_device_from_catalog_entry ¶
func (this *Lbd_lib) New_block_device_from_catalog_entry(catentry *Catalog_entry) *Lbd_device
func (*Lbd_lib) Set_log ¶
func (this *Lbd_lib) Set_log(l *tools.Nixomosetools_logger)
func (*Lbd_lib) Start_stree ¶
Click to show internal directories.
Click to hide internal directories.