/* $Id: pfs_dn_internal.x 324 2010-11-15 23:38:24Z gerd $ -*- c -*- */Internal stuff.
#ifndef PFS_DN_INTERNAL_X #define PFS_DN_INTERNAL_X #include "pfs_types.x"
Datanode_ctrl
Datanode_ctrl
program is running on each datanode, but
only invoked by the coordinator to push and revoke safetrans tickets.
program Datanode_ctrl { version V1 {
null
void null(void) = 0;
reset_all_safetrans
void reset_all_safetrans(void) = 1;Revokes all safetrans tickets. This is called when the coordinator starts up.
cancel_safetrans
void cancel_safetrans(hyper) = 2;Cancel the safetrans ticket with this
st_id
safetrans
void safetrans(hyper, hyper, hyper) = 3;
safetrans(st_id, st_tmo, st_secret)
: Enables all safetrans
tickets with ID st_id
. The secret st_secret
is used
for securing the ticket system.
} = 1; } = 0x8000d002;
Datanode_io
Datanode_io
program is running in the I/O processes of the
datanodes
program Datanode_io { version V1 {
null
void null(void) = 0;
read
void read(int, hyper, int, int) = 1;
read(slot, block, pos, len)
: Reads the block (or part of it)
to the shm slot
read_shm
void read_shm(dn_channel_shm_obj, hyper, int, int) = 7;
read_shm(shm, block, pos, len)
: Reads the block (or part of it)
to the passed shm object. It is an error if the oject is not
large enough.
write
void write(int, hyper) = 2;
write(slot, block)
: Writes the contents of slot
to block
write_shm
void write_shm(dn_channel_shm_obj, hyper) = 8;
write_shm(shm, block)
: Writes the contents of shm
to block
.
Exactly blocksize bytes are written.
copy
void copy(hyper, longstring, longstring, hyper, ticket, int) = 3;
copy(block, dest_node, dest_identity, dest_block,
dest_ticket, slot)
sync
void sync(void) = 4;syncs everything to disk
size
hyper size(void) = 5;same as in
Datanode
identity
longstring identity(void) = 6;same as in
Datanode
} = 1; } = 0x8000d003; #endif