group
group__libshare__fs
The share library 'share-fs' file system consists of multiple partitions.

The Share File-system

The share-fs partitions can be accessed through via the shcat, shcp, shfsck, shln, shls, shrev, shrm, and command-line programs. shstat structshstat compound
  • Share Utility Programs shareutil compound
typedef
typedef struct shfs_t shfs_t
A type defintion for the sharefs filesytem structure.
typedef
typedef struct shfs_ino_t shfs_ino_t
A sharefs filesystem inode.
typedef
typedef __uint16_t shfs_inode_off_t
A sharefs filesystem inode or journal reference.
typedef
typedef __uint16_t shfs_ino_type_t
A sharefs inode type definition.
typedef
typedef __uint32_t shfs_attr_t
A sharefs inode attribute definitions.
typedef
typedef struct shfs_idx_t shfs_idx_t
A sharefs filesystem inode position header.
typedef
typedef struct shfs_hdr_t shfs_hdr_t
typedef
typedef struct shfs_block_t shfs_block_t
typedef
typedef struct shfs_t SHFS
A convienence macro for accessing a sharefs file partition.
typedef
typedef struct shfs_ino_t SHFL
A convienence macro for accessing a sharefs file node.
typedef
typedef struct shfs_root_t shfs_root_t
define
SHFS_LEVEL_PUBLIC
0
[ ]
define
SHFS_MAX_LEVELS
1
[ ]
define
SHINODE_NULL
0
An inode reference to nothing.
define
SHINODE_APP
100
Inode is in reference to an application-specific directory.
Note
See also:
shfs_node.d_type
define
SHINODE_PARTITION
101
Inode is the root of an entire sharefs partition.
Note
See also:
shfs_node.d_type
define
SHINODE_PEER
102
Inode is a reference to a remote sharefs partition.
Note
See also:
shfs_node.d_type
define
SHINODE_ARCHIVE
104
An archive of files and/or directories.
Note
See also:
shfs_node.d_type
define
SHINODE_REFERENCE
105
A reference to another inode.
Note
The referenced inode may be local or remote.
define
SHINODE_META
106
A meta definition hashmap (meta map).
Note
The referenced inode may be local or remote.
define
SHINODE_DIRECTORY
107
A directory containing multiple file references.
define
SHINODE_AUX
108
An auxillary unparseable data segment stored in the sharefs sub-system.
define
SHINODE_FILE
109
A generic reference to a path which contains further references to data.
define
SHINODE_BINARY
110
Raw binary data referenced by a.
See
inode. SHINODE_FILE group__libshare__fs_1gaefe1cc3781ca42b779d0239528f68679 member
Note
A SHINODE_BINARY inode contains SHINODE_AUX referencing the raw binary data segments.
define
SHINODE_COMPRESS
112
A zlib compressed binary segment.
define
SHINODE_CRYPT
113
A TEA encoded binary segment.
define
SHINODE_DATABASE
114
A reference to a sqlite database.
define
SHINODE_ACCESS
115
Inode specific permissions based on credentials.
define
SHINODE_FILE_LOCK
116
Inode specific access mutex.
define
SHINODE_LICENSE
117
define
SHINODE_EXTERNAL
118
define
SHINODE_REPOSITORY
120
A repository of file revisions.
define
SHINODE_REVISION
121
A reference to a particular version of a file.
define
SHINODE_DELTA
122
Inode is a reference to a binary delta of a file revision.
define
SHINODE_OBJECT
130
A generic reference to a collection of data.
define
SHINODE_OBJECT_KEY
131
define
SHINODE_TEST
140
A libshare inode type used for testing purposes.
define
SHINODE_DEVICE
150
A libshare inode containing auxillary SEXE bytecode.
The SEXE bytecode is executed in order to pipe a read / write stream.
define
IS_INODE_CONTAINER
(_type != SHINODE_AUX && \ _type != SHINODE_REFERENCE && \ _type != SHINODE_EXTERNAL && \ _type != SHINODE_LICENSE && \ _type != SHINODE_FILE_LOCK && \ _type != SHINODE_OBJECT_KEY)
define
SHFS_MAX_BLOCK_SIZE
4096
The maximum size a single block can contain.
Note
Each block segment is 4096 bytes which is equal to the size of structure.
shfs_ino_t structshfs__ino__t compound
define
SHFS_BLOCK_DATA_SIZE
(SHFS_MAX_BLOCK_SIZE - sizeof())structshfs__hdr__tcompoundshfs_hdr_t
The size of the data segment each inode contains.
define
SHFS_MAX_BLOCK
57344
The maximum number of blocks in a sharefs journal.
define
SHFS_PATH_MAX
(SHFS_BLOCK_DATA_SIZE - 34)
The maximum length of a sharefs file name.
Note
The length is subtracted by 16 bytes of a hash tag incase to track longer filenames and 1 byte for a null-terminator.
define
SHFS_ATTR_BITS
"abcdefhlmrstvwxz"
The character tokens representing the inode attributes.
define
SHATTR_ARCH
(1 << 0)
Indicates the inode contains an SHINODE_ARCHIVE file containing stored directories and/or files.
define
SHATTR_BLOCK
(1 << 1)
define
SHATTR_CRED
(1 << 2)
Indicates the inode has SHINODE_ACCESS credentials.
define
SHATTR_DB
(1 << 3)
Indicates the inode is a database.
define
SHATTR_ENC
(1 << 4)
Indicates the inode is encrypted.
define
SHATTR_FLOCK
(1 << 5)
Indicates the inode has a SHINODE_FILE_LOCK lock blocking access.
define
SHATTR_HIDDEN
(1 << 6)
Indicates the inode is not listed in a directory listing.
define
SHATTR_LINK
(1 << 7)
Indicates the inode is a SHINODE_REFERENCE to another inode.
define
SHATTR_META
(1 << 8)
This inode has supplementatal SHINODE_META information.
define
SHATTR_READ
(1 << 9)
Indicates the inode has global read access.
define
SHATTR_SYNC
(1 << 10)
Indicates the inode synchronizes with the share daemon.
define
SHATTR_TEMP
(1 << 11)
Indicates that inode is not persistent.
define
SHATTR_VER
(1 << 12)
This inode has multiple revision versions.
define
SHATTR_WRITE
(1 << 13)
This inode has global write access.
define
SHATTR_EXE
(1 << 14)
This inode has global execute access.
define
SHATTR_COMP
(1 << 15)
Indicates the inode is storing compressed data.
define
SHATTR_LINK_EXT
(SHATTR_LINK)
A SHINODE_EXTERNAL inode referencing a local-disk path.
define
HAS_SHMETA_INODE
( (_ino->blk.hdr.attr & SHATTR_META) || \ )
define
SHINODE_DEFAULT_ATTR_FORMAT
( \ ((_attr) & SHATTR_DB) ? SHINODE_DATABASE : \ ((_attr) & SHATTR_VER) ? SHINODE_REVISION : \ ((_attr) & SHATTR_ENC) ? SHINODE_CRYPT : \ ((_attr) & SHATTR_COMP) ? SHINODE_COMPRESS : \ SHINODE_BINARY \ )
The default format for data contained by a SHINODE_FILE inode.
Note
Does not apply to SHINODE_LINK references.
define
IS_SHINODE_ARCHIVABLE
(shfs_format(_ino) == SHINODE_DIRECTORY)
can inode be archived.
define
IS_SHINODE_COMPRESSABLE
(shfs_format(_ino) == SHINODE_BINARY)
can inode be compressed.
define
IS_SHINODE_ENCRYPTABLE
(shfs_format(_ino) == SHINODE_BINARY || \ shfs_format(_ino) == SHINODE_COMPRESS)
can inode be encrypted.
define
IS_SHINODE_VERSIONABLE
(shfs_format(_ino) == SHINODE_BINARY)
can inode be converted into a revision repository.
define
MAX_JOURNAL_CACHE_SIZE
256
The maximum number of sharefs journals (and sub-sequent file descriptor) open at once.
define
SHFS_MAX_JOURNAL
57344
The number of journals a sharefs filesystem contains.
shfs_journal_t.index structshfs__journal__t_1aa57dd3556ed79f58879abf613a9bebd6 member
define
SHFS_MAX_JOURNAL_SIZE
(SHFS_MAX_BLOCK * SHFS_MAX_BLOCK_SIZE)
The maximum number of bytes in a sharefs file-system journal.
define
SHMETA_READ
"read"
define
SHMETA_WRITE
"write"
define
SHMETA_EXEC
"exec"
define
SHMETA_USER
"user"
The read-access group assigned to the inode.
define
SHMETA_GROUP
"group"
define
SHMETA_SIGNATURE
"signature"
A digital signature.
define
SHMETA_DESC
"desc"
A textual description of the inode.
define
SHMETA_USER_NAME
"user.name"
login user's real name
define
SHMETA_USER_EMAIL
"user.email"
login user's email address.
define
SHMETA_USER_GEO
"user.geo"
define
SHMETA_USER_PASS
"sys.pass"
login user's password key.
define
SHMETA_USER_SALT
"sys.salt"
login user's password salt.
define
SHMETA_MIME_TYPE
"mime.name"
login user's password salt.
define
BASE_SHMETA_PATH
"meta"
A directory prefix referencing file meta information.
define
shfs_meta_free
shmap_free(_meta_p)
Free an instance to a sharedfs meta definition hashmap.
Note
Directly calls .
shmap_free() group__libshare__memmap_1ga5f1038ec61685cc6883b94272aa81731 member