nfs-ganesha 1.4
|
Go to the source code of this file.
#define FSAL_POSIXDB_IS_ERROR | ( | _status_ | ) | ( ! ( ( _status_ ).major == ERR_FSAL_POSIXDB_NOERR ) ) |
#define FSAL_POSIXDB_IS_NOENT | ( | _status_ | ) | ( ( _status_ ).major == ERR_FSAL_POSIXDB_NOENT ) |
typedef enum fsal_posixdb_errorcode fsal_posixdb_errorcode |
typedef struct fsal_posixdb_status_t fsal_posixdb_status_t |
fsal_posixdb_status_t fsal_posixdb_add | ( | fsal_posixdb_conn * | p_conn, |
fsal_posixdb_fileinfo_t * | p_object_info, | ||
posixfsal_handle_t * | p_parent_directory_handle, | ||
fsal_name_t * | p_filename, | ||
posixfsal_handle_t * | p_object_handle | ||
) |
fsal_posixdb_add: Add an object in the database (identified by its name and its parent directory). Create an entry in the Handle table if needed, and add (or replace existing) an entry in the Path table.
conn | (input) Database connection |
p_object_info | (input): POSIX information of the object to add (device ID, inode, ...) |
p_parent_directory_handle | (input): Handle of the parent directory of the object to add. |
p_filename | (input): The name of the object to add. |
p_object_handle | (output): FSAL handle of the added entry. |
Definition at line 16 of file MYSQL/posixdb_add.c.
int fsal_posixdb_cache_init | ( | ) |
Definition at line 27 of file MYSQL/posixdb_internal.c.
fsal_posixdb_status_t fsal_posixdb_cancelHandleLock | ( | fsal_posixdb_conn * | p_conn | ) |
Unlock the Handle line previously locked by fsal_posixdb_lockHandleForUpdate.
p_conn | Database connection |
Definition at line 58 of file MYSQL/posixdb_lock.c.
fsal_posixdb_status_t fsal_posixdb_connect | ( | fsal_posixdb_conn_params_t * | dbparams, |
fsal_posixdb_conn ** | p_conn | ||
) |
fsal_posixdb_connect: Connect to the Database and initialize *dbconn.
params | (input) Connection parameters |
conn | (output) Connection to the database |
connection to database
Definition at line 45 of file MYSQL/posixdb_connect.c.
fsal_posixdb_status_t fsal_posixdb_delete | ( | fsal_posixdb_conn * | p_conn, |
posixfsal_handle_t * | p_parent_directory_handle, | ||
fsal_name_t * | p_filename, | ||
fsal_posixdb_fileinfo_t * | p_object_info | ||
) |
fsal_posixdb_delete: Delete a path entry for an object. If the file has only one path (hardlink = 1), its handle is deleted too.
p_conn | (input) Database connection |
p_parent_directory_handle | (input): Handle of the directory where the object is. |
p_filename | (input): The name of the object to delete. |
p_object_info | (input): POSIX information of the object (device ID, inode, ...) |
Definition at line 10 of file MYSQL/posixdb_delete.c.
fsal_posixdb_status_t fsal_posixdb_deleteHandle | ( | fsal_posixdb_conn * | p_conn, |
posixfsal_handle_t * | p_handle | ||
) |
fsal_posixdb_deleteHandle: Delete a Handle and all paths related to him.
p_conn | (input) Database connection |
p_handle | (input): Handle of the directory where the object is. |
Definition at line 71 of file MYSQL/posixdb_delete.c.
fsal_posixdb_status_t fsal_posixdb_disconnect | ( | fsal_posixdb_conn * | p_conn | ) |
fsal_posixdb_disconnect: Disconnect from the Database.
conn | (input) Connection to the database |
Definition at line 126 of file MYSQL/posixdb_connect.c.
fsal_posixdb_status_t fsal_posixdb_export | ( | fsal_posixdb_conn * | p_conn, |
FILE * | out | ||
) |
fsal_posixdb_export: Export the content of the database to a file.
p_conn | (input) Database connection |
out | (input): POSIX file descriptor |
fsal_posixdb_status_t fsal_posixdb_flush | ( | fsal_posixdb_conn * | p_conn | ) |
fsal_posixdb_flush: Empty the database.
p_conn | (input) Database connection |
Definition at line 9 of file MYSQL/posixdb_flush.c.
fsal_posixdb_status_t fsal_posixdb_getChildren | ( | fsal_posixdb_conn * | p_conn, |
posixfsal_handle_t * | p_parent_directory_handle, | ||
unsigned int | max_count, | ||
fsal_posixdb_child ** | p_children, | ||
unsigned int * | p_count | ||
) |
fsal_posixdb_getChildren: retrieve all the children of a directory handle.
p_conn | (input) Database connection |
p_parent_directory_handle | (input): Handle of the directory where the objects to be retrieved are. |
max_count | max fsal_posixdb_child to be returned |
p_children,: | Children of p_parent_directory_handle. It is dynamically allocated inside the function. It have to be freed outside the function !!! |
p_count,: | Number of children returned in p_children |
fsal_posixdb_getChildren: retrieve all the children of a directory handle.
p_conn | (input) Database connection |
p_parent_directory_handle | (input): Handle of the directory where the objects to be retrieved are. |
p_children,: | Children of p_parent_directory_handle. It is dynamically allocated inside the function. It have to be freed outside the function !!! |
p_count,: | Number of children returned in p_children |
Definition at line 28 of file MYSQL/posixdb_getChildren.c.
fsal_posixdb_status_t fsal_posixdb_getInfoFromHandle | ( | fsal_posixdb_conn * | p_conn, |
posixfsal_handle_t * | p_object_handle, | ||
fsal_path_t * | p_paths, | ||
int | paths_size, | ||
int * | p_count | ||
) |
fsal_posixdb_getInfoFromHandle: Fills informations known about an object (inside its posixfsal_handle_t object), its 'paths', knowing its FSAL handle.
conn | (input) Database connection |
object_handle | (input) Handle of the object. |
p_paths | (output) Array of path to the objects |
paths_size | (input) Number of elements of p_paths allocated |
p_count | (output) Number of paths set in p_paths |
p_infos | (output) POSIX information stored in the database. |
Definition at line 109 of file MYSQL/posixdb_info.c.
fsal_posixdb_status_t fsal_posixdb_getInfoFromName | ( | fsal_posixdb_conn * | p_conn, |
posixfsal_handle_t * | p_parent_directory_handle, | ||
fsal_name_t * | p_objectname, | ||
fsal_path_t * | p_path, | ||
posixfsal_handle_t * | p_handle | ||
) |
fsal_posixdb_getInfoFromName: Return informations known about an object, knowing the FSAL handle of its parent and its name.
conn | (input) Database connection |
p_parent_directory_handle | (input) Handle of the parent directory to search the object in. |
p_objectname | (input) The name of the object to find. |
p_path | (optional output) path to the objects |
p_handle | (output) Handle of the object found in the database |
Definition at line 10 of file MYSQL/posixdb_info.c.
fsal_posixdb_status_t fsal_posixdb_getParentDirHandle | ( | fsal_posixdb_conn * | p_conn, |
posixfsal_handle_t * | p_object_handle, | ||
posixfsal_handle_t * | p_parent_directory_handle | ||
) |
fsal_posixdb_getParentDirHandle: get the parent directory of a directory (p_object_handle must have only one Parent entry).
p_conn | (input) Database connection |
p_object_handle | (input): Directory Handle we want the parent |
p_parent_directory_handle | (output): Parent directory handle ( corresponding to <path to="" p_object_handle>="">/.. ) |
Definition at line 270 of file MYSQL/posixdb_info.c.
fsal_posixdb_status_t fsal_posixdb_import | ( | fsal_posixdb_conn * | p_conn, |
FILE * | in | ||
) |
fsal_posixdb_import: Import the content of the database from a file.
p_conn | (input) Database connection |
in | (input): POSIX file descriptor |
fsal_posixdb_status_t fsal_posixdb_lockHandleForUpdate | ( | fsal_posixdb_conn * | p_conn, |
fsal_posixdb_fileinfo_t * | p_info | ||
) |
Lock the line of the Handle table with inode & devid defined in p_info.
p_conn | Database connection |
p_info | Information about the file |
Definition at line 21 of file MYSQL/posixdb_lock.c.
fsal_posixdb_status_t fsal_posixdb_replace | ( | fsal_posixdb_conn * | p_conn, |
fsal_posixdb_fileinfo_t * | p_object_info, | ||
posixfsal_handle_t * | p_parent_directory_handle_old, | ||
fsal_name_t * | p_filename_old, | ||
posixfsal_handle_t * | p_parent_directory_handle_new, | ||
fsal_name_t * | p_filename_new | ||
) |
fsal_posixdb_replace: Move an object in the Path table (identified by its name and its parent directory). Create an entry in the Handle table if needed, and update (or create) an entry in the Path table.
conn | (input) Database connection |
p_object_info | (input): POSIX information of the object to add (device ID, inode, ...) |
p_parent_directory_handle_old | (input): Handle of the source directory of the object. |
p_filename_old | (input): The old name of the object. |
p_parent_directory_handle_new | (input): Handle of the new directory of the object. |
p_filename_new | (input): The new name of the object. |
Definition at line 11 of file MYSQL/posixdb_replace.c.