Plasma GitLab Archive
Projects Blog Knowledge

Class type Nn_state.inode_view_t


class type inode_view_t = object .. end
Inherits

inode access

method inode_get_e : id:int64 -> Pfs_rpcapi_aux.inodeinfo option Uq_engines.engine
method inode_alloc_e : Pfs_rpcapi_aux.inodeinfo -> int64 Uq_engines.engine
Inserts a new inode and returns the ID. One cannot set the blocklimit (it is always 0)
method inode_upd_e : id:int64 ->
keep_blocklimit:bool -> Pfs_rpcapi_aux.inodeinfo -> unit Uq_engines.engine
Updates the inode. Note that an update of blocklimit is only allowed if keep_blocklimit=false. filetype changes are silently ignored.
method inode_dealloc_e : id:int64 -> unit Uq_engines.engine
deletes the inode. precondition: there must not be any filenames pointing to id. This is not checked, however.
method inode_get_blocks_e : id:int64 ->
blkidx:int64 ->
len:int64 ->
bm_view_t -> Pfs_rpcapi_aux.blockinfo list Uq_engines.engine
returns blocks. These blocks are immediately marked as to keep in the blockmap
method inode_upd_blocks_e : id:int64 ->
del:int64 * int64 ->
add:Pfs_rpcapi_aux.blockinfo list ->
set_mtime:bool -> set_blocklimit:int64 -> unit Uq_engines.engine
First delete the blocks in the del range, then add the blocks from add.

If set_mtime, sets the mtime fields in inodeinfo to the server time.

set_blocklimit: the new blocklimit field in inodeinfo.

method inode_upd_time : id:int64 ->
mtime:Pfs_rpcapi_aux.time option -> ctime:Pfs_rpcapi_aux.time option -> unit
This update of mtime/ctime is lock-free

Filenames

For simplicity, the filename access is also defined here. Inodes and filenames interact with each other to some extent, and it is important that inode and filename operations are executed in the right order with respect to each other.

The implementation of the following assumes that the names are well-formed absolute Unix filenames - no double /, no trailing /.

method filename_get_e : name:string -> int64 option Uq_engines.engine
exists_lock: whether to create an `Exists lock
method filename_rev_get_e : inode:int64 -> string list Uq_engines.engine
method filename_count_e : inode:int64 -> int Uq_engines.engine
The count is the number of names for an inode (same as length of list returned by filename_rev_get_e)
method filename_list_e : name:string -> (string * int64) list Uq_engines.engine
Lists subnames of a potential directory name, together with inodes
method filename_link_e : name:string -> parent:string -> inode:int64 -> int64 Uq_engines.engine
adds this filename. It is checked that the filename does not exist before the addition. Also the parent must exist, and have the type "directory". If the linked inode is a directory itself, it is checked that there is no other name for it yet.

Returns the inode of the parent directory.

method filename_unlink_e : name:string -> int64 Uq_engines.engine
deletes this filename

The returned inode is the inode of the parent

method delayed_inode_deletes : int64 list
Inodes to be deleted at the end of the transaction
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml