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_get_with_lock_e : id:int64 -> Pfs_rpcapi_aux.inodeinfo option Uq_engines.engine
like inode_get_e but immediately acquires a write lock for the inode
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.

method filename_get_e : dir_inode:int64 -> name:string -> int64 option Uq_engines.engine
Returns the inode of the member name of directory dir_inode
method filename_rev_get_e : inode:int64 -> (int64 * string) list Uq_engines.engine
filename_rev_get does not acquire locks. Returns [] for inode=1
method filename_rev_get_dir_e : inode:int64 -> (int64 * string * (unit -> unit)) Uq_engines.engine
Works only for directories, and obtains an existence lock for the directory. May ECONFLICT.

The return value is (parent_dir_inode, dir_name, unlock)

For inode=1, the value is (1,"/",unlock).

method filename_parent_dir_e : inode:int64 -> int64 option Uq_engines.engine
Returns the parent directory
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 : dir_inode:int64 -> (string * int64) list Uq_engines.engine
Lists subnames of a potential directory name, together with inodes
method filename_link_e : dir_inode:int64 -> name:string -> inode:int64 -> unit 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". The parent must have a name. If the linked inode is a directory itself, it is checked that there is no other name for it yet.
method filename_unlink_e : dir_inode:int64 -> name:string -> unit Uq_engines.engine
deletes this filename from this directory
method filename_rename_e : from_dir_inode:int64 ->
from_name:string ->
to_dir_inode:int64 -> to_name:string -> unit Uq_engines.engine
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