Commit 8de0c49f authored by gerd's avatar gerd

New: Plasma_writebuf. Using it for NFS.


git-svn-id: https://gps.dynxs.de/private/svn/app-plasma/trunk@641 55289a75-7b90-4627-9e07-ffb4263930b2
parent f4ce5dad
......@@ -66,11 +66,12 @@ Client applications can only link with {b plasmasupport} and
{!modules:
Plasma_client
Plasma_client_config
Plasma_writebuf
Plasma_netfs
Plasma_shm
Plasma_inodecache
Plasma_filebuf
Plasma_blocks
Plasma_netfs
}
These are the mappings of the XDR definition to Ocaml (as used in
......
......@@ -56,7 +56,6 @@ FILES[] =
nfs3_aux
nfs3_srv
nfs3_clnt
nfs3d_writebuf
nfs3d_manager
LIB = pfs_nfs3
......
......@@ -59,7 +59,7 @@ type rundata =
mutable ug_admin_file_t : float;
mutable ug_admin_check_t : float;
esys : Unixqueue.event_system;
wbuf : Nfs3d_writebuf.write_buffer;
wbuf : Plasma_writebuf.write_buffer;
}
type nfs_error =
......@@ -398,7 +398,7 @@ let new_rundata conf =
ug_admin_file_t;
ug_admin_check_t = Unix.gettimeofday();
esys = esys;
wbuf = Nfs3d_writebuf.create cluster wbufs 0.1;
wbuf = Plasma_writebuf.create cluster wbufs 0.1;
} in
load_mount_table rd;
rd
......
......@@ -59,6 +59,7 @@ FILES[] =
plasma_client
plasma_netfs
plasma_opendir
plasma_writebuf
OCAMLINCLUDES = ../plasmasupport
......
(* $Id$ *)
(** Write buffers
(* TODO:
The task of these buffers is to combine several small writes arriving
via NFS to few large writes submitted to PlasmaFS
- don't use the write buffers if the block is already in-core
- provide read_e: = Plasma_client.read_e plus mods from write buffers
- verify get_write_eof - also take existing EOF position into account
*)
(** Write buffers
This is a thin layer on top of {!Plasma_client}. The task of these
buffers is to combine several small writes to few large writes
submitted to PlasmaFS. This is reasonable when the small writes
are smaller than a block but combine together to a whole block
or more.
The idea is to call the [write_e] function of this module instead
of the same-name function of {!Plasma_client}. The data is buffered
up at most until [flush_e] is called.
*)
type write_buffer
val create : Plasma_client.plasma_cluster -> int -> float -> write_buffer
......@@ -17,14 +31,26 @@ val create : Plasma_client.plasma_cluster -> int -> float -> write_buffer
val write_e : write_buffer -> int64 -> int64 -> string -> int -> int ->
int Uq_engines.engine
(** [write_e wbuf inode filepos data datapos datalen] *)
(** [write_e wbuf inode filepos data datapos datalen].
Same as {!Plasma_client.write_e} on the level of write buffers.
*)
val flush_e : write_buffer -> int64 -> unit Uq_engines.engine
(** [flush_e wbuf inode] *)
(** [flush_e wbuf inode]
Same as {!Plasma_client.flush_e} on the level of write buffers.
*)
val get_write_eof : write_buffer -> int64 -> int64
(** [get_write_eof wbuf inode] *)
(** [get_write_eof wbuf inode]
Same as {!Plasma_client.get_write_eof} on the level of write buffers.
*)
val get_write_mtime : write_buffer -> int64 -> Plasma_rpcapi_aux.time
(** [get_write_mtime wbuf inode] *)
(** [get_write_mtime wbuf inode]
Same as {!Plasma_client.get_write_mtime} on the level of write buffers.
*)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment