Library for RKFS
[MySQL FS Kernel Module]


different variables use by MySQLFS

int rkfs_next_data_item (char **com_data_pos, char *ret_buf)
 Read next data item from a answer received from a deamon.
int rkfs_atoi (char *str)
 Atoi function.

Functions

int query (const char *command, int command_length)
 Function to send message to deamon.
void rkfs_deamon_test (void)
 Function for testing deamon.
 module_init (rkfs_init_module)
 module_exit (rkfs_cleanup_module)

Variables

int result
struct_command ret_command
char out_buf [OUT_BUF_LENGTH]
file_system_type rkfs

Function Documentation

module_exit ( rkfs_cleanup_module   ) 

Modul exit function

module_init ( rkfs_init_module   ) 

Modul initialization function

int query ( const char *  command,
int  command_length 
)

Function to send message to deamon.

Send message to deamon, accept answer message and parse it.

Parameters:
command command to be executed by deamon
command_length length of command without trailing zero
Returns:
RKFS_DEF_QUERY_OK on success or RKFS_DEF_QUERY_ERROR. on fail
Filesystem uses this function to send a comand (
See also:
doc/protokol/protokol.txt). When command is send, deamon sleep on this call of this function. When kernel return from this function, the result of the command is in buffer and can be parsed and used.

Definition at line 185 of file fs_main.c.

References fsc_query(), FSPDEBUG, out_buf, OUT_BUF_LENGTH, parse_message(), result, ret_command, RKFS_DEF_QUERY_ERROR, and RKFS_DEF_QUERY_OK.

Referenced by fsd_add_block(), fsd_clear_file(), fsd_create(), fsd_dir_exists(), fsd_dir_info(), fsd_dir_name_exists(), fsd_file_exists(), fsd_file_info(), fsd_file_name_exists(), fsd_get_block(), fsd_lookup(), fsd_mkdir(), fsd_move_file(), fsd_read_dir(), fsd_read_inode(), fsd_remove_dir(), fsd_remove_file(), fsd_rename_dir(), fsd_rename_file(), fsd_replace_block(), fsd_truncate_file(), rkfs_deamon_test(), rkfs_file_read(), rkfs_file_readdir(), rkfs_file_write(), rkfs_inode_create(), rkfs_inode_lookup(), rkfs_inode_rename(), rkfs_inode_truncate(), rkfs_inode_unlink(), rkfs_mkdir(), rkfs_rmdir(), and rkfs_super_read_inode().

int rkfs_atoi ( char *  str  ) 

Atoi function.

Converts string to Integer.

Parameters:
str string to be converted.
Returns:
Integer converted from str.
It has litle bit other behaviour, than usual atoi. It doesn't check any errors. When something not a number represintig char is in string, it's like it would be '0' instead.

Definition at line 307 of file fs_main.c.

References result.

Referenced by rkfs_file_readdir(), rkfs_inode_create(), rkfs_inode_lookup(), rkfs_inode_rename(), rkfs_mkdir(), and rkfs_super_read_inode().

void rkfs_deamon_test ( void   ) 

Function for testing deamon.

Send various messages to deamon. Function is used only for testing. This time is not used at any place in the project, but we still leave it here, it can be used in future when we make some changes in deamon. This function is only for debugging purposis.

Definition at line 214 of file fs_main.c.

References query().

int rkfs_next_data_item ( char **  com_data_pos,
char *  ret_buf 
)

Read next data item from a answer received from a deamon.

Message used for parsing data from message.

Parameters:
com_data_pos Position where we stop parcing last time.
ret_buf buffer for returned item
Returns:
Length of read data.
When a answer came, it can seems like /xx/2/4/ddd/5/5/... this function is used to parce messages like this. It litle bit poiter juggling

Definition at line 281 of file fs_main.c.

Referenced by rkfs_file_readdir(), rkfs_inode_lookup(), rkfs_inode_rename(), and rkfs_super_read_inode().


Variable Documentation

char out_buf[OUT_BUF_LENGTH]

buffer for output messages

Definition at line 167 of file fs_main.c.

Referenced by query().

int result

variable for storing result form function query

Definition at line 161 of file fs_main.c.

Referenced by __fsc_query__(), fsc_query(), fsd_chardevice_read(), fsd_chardevice_write(), main(), query(), rkfs_atoi(), and rkfs_get_sb().

struct_command ret_command

structure for storing parsed command

Definition at line 164 of file fs_main.c.

Referenced by query(), rkfs_file_read(), rkfs_file_readdir(), rkfs_file_write(), rkfs_inode_create(), rkfs_inode_lookup(), rkfs_inode_rename(), rkfs_inode_truncate(), rkfs_inode_unlink(), rkfs_mkdir(), rkfs_rmdir(), and rkfs_super_read_inode().

struct file_system_type rkfs

Initial value:

 {
  name:        "rkfs",
  get_sb:     rkfs_get_sb,
  kill_sb:    rkfs_kill_sb,
  owner:      THIS_MODULE
}
structure for registration modul as filesystem

Definition at line 260 of file fs_main.c.


Generated on Mon May 28 13:33:08 2007 for MYSQLFS by  doxygen 1.5.0