nfs-ganesha 1.4
|
Prototypes for the file handle in v2, v3, v4. More...
#include <sys/types.h>
#include <sys/param.h>
#include <dirent.h>
#include <netdb.h>
#include "log.h"
#include "nfs23.h"
Go to the source code of this file.
Prototypes for the file handle in v2, v3, v4.
nfs_file_handle.h : Prototypes for the file handle in v2, v3, v4.
Definition in file nfs_file_handle.h.
#define GANESHA_FH_VERSION ULTIMATE_ANSWER - 1 |
Definition at line 60 of file nfs_file_handle.h.
#define LEN_FH_STR 1024 |
Definition at line 140 of file nfs_file_handle.h.
#define LogHandleNFS4 | ( | label, | |
fh4p | |||
) |
do { \ if(isFullDebug(COMPONENT_NFS_V4)) \ { \ char str[LEN_FH_STR]; \ sprint_fhandle4(str, fh4p); \ LogFullDebug(COMPONENT_NFS_V4, "%s%s", label, str); \ } \ } while (0)
Definition at line 203 of file nfs_file_handle.h.
#define ULTIMATE_ANSWER 0x42 |
Definition at line 58 of file nfs_file_handle.h.
typedef struct file_handle_v2 file_handle_v2_t |
typedef struct file_handle_v3 file_handle_v3_t |
typedef struct file_handle_v4 file_handle_v4_t |
void LogCompoundFH | ( | compound_data_t * | data | ) |
print_compound_fh
This routine prints all the file handle within a compoud request's data structure.
data | [IN] compound's data to manage. |
Definition at line 909 of file nfs_filehandle_mgmt.c.
short nfs2_FhandleToExportId | ( | fhandle2 * | pfh2 | ) |
nfs2_FhandleToExportId
This routine extracts the export id from the file handle NFSv2
pfh2 | [IN] file handle to manage. |
Definition at line 481 of file nfs_filehandle_mgmt.c.
int nfs2_FhandleToFSAL | ( | fhandle2 * | pfh2, |
struct fsal_handle_desc * | fh_desc, | ||
fsal_op_context_t * | pcontext | ||
) |
nfs2_FhandleToFSAL: converts a nfs2 file handle to a FSAL file handle.
Converts a nfs2 file handle to a FSAL file handle.
pfh2 | [IN] pointer to the file handle to be converted |
pfsalhandle | [OUT] pointer to the extracted FSAL handle |
Definition at line 212 of file nfs_filehandle_mgmt.c.
int nfs2_FSALToFhandle | ( | fhandle2 * | pfh2, |
fsal_handle_t * | pfsalhandle, | ||
exportlist_t * | pexport | ||
) |
nfs2_FSALToFhandle: converts a FSAL file handle to a nfs2 file handle.
Converts a nfs2 file handle to a FSAL file handle.
pfh2 | [OUT] pointer to the extracted file handle |
pfsalhandle | [IN] pointer to the FSAL handle to be converted |
pfsalhandle | [IN] pointer to the FSAL handle to be converted |
Definition at line 362 of file nfs_filehandle_mgmt.c.
short nfs3_FhandleToExportId | ( | nfs_fh3 * | pfh3 | ) |
nfs3_FhandleToExportId
This routine extracts the export id from the file handle NFSv3
pfh3 | [IN] file handle to manage. |
Definition at line 440 of file nfs_filehandle_mgmt.c.
int nfs3_FhandleToFSAL | ( | nfs_fh3 * | pfh3, |
struct fsal_handle_desc * | fh_desc, | ||
fsal_op_context_t * | pcontext | ||
) |
nfs3_FhandleToFSAL: converts a nfs3 file handle to a FSAL file handle.
Converts a nfs3 file handle to a FSAL file handle.
pfh3 | [IN] pointer to the file handle to be converted |
pfsalhandle | [OUT] pointer to the extracted FSAL handle |
Definition at line 171 of file nfs_filehandle_mgmt.c.
int nfs3_FSALToFhandle | ( | nfs_fh3 * | pfh3, |
fsal_handle_t * | pfsalhandle, | ||
exportlist_t * | pexport | ||
) |
nfs3_FSALToFhandle: converts a FSAL file handle to a nfs3 file handle.
Converts a nfs3 file handle to a FSAL file handle.
pfh3 | [OUT] pointer to the extracted file handle |
pfsalhandle | [IN] pointer to the FSAL handle to be converted |
pexport | [IN] pointer to the export list entry the FH belongs to |
FIXME: do we have to worry about buffer alignment and memcpy to compensate??
Definition at line 312 of file nfs_filehandle_mgmt.c.
int nfs3_Is_Fh_Invalid | ( | nfs_fh3 * | pfh3 | ) |
nfs3_Is_Fh_Invalid
This routine is used to test if a fh is invalid.
pfh | [IN] file handle to test. |
Definition at line 686 of file nfs_filehandle_mgmt.c.
int nfs3_Is_Fh_Xattr | ( | nfs_fh3 * | pfh | ) |
nfs4_Is_Fh_Xattr
This routine is used to test is a fh refers to a Xattr related stuff
pfh | [IN] file handle to test. |
Definition at line 504 of file nfs_filehandle_mgmt.c.
short nfs4_FhandleToExportId | ( | nfs_fh4 * | pfh4 | ) |
nfs4_FhandleToExportId
This routine extracts the export id from the file handle NFSv4
pfh4 | [IN] file handle to manage. |
Definition at line 417 of file nfs_filehandle_mgmt.c.
int nfs4_FhandleToFSAL | ( | nfs_fh4 * | pfh4, |
struct fsal_handle_desc * | fh_desc, | ||
fsal_op_context_t * | pcontext | ||
) |
nfs4_FhandleToFSAL: converts a nfs4 file handle to a FSAL file handle.
Validates and Converts a nfs4 file handle to a FSAL file handle.
pfh4 | [IN] pointer to the file handle to be converted |
fh_desc | [OUT] extracted handle descriptor |
Definition at line 128 of file nfs_filehandle_mgmt.c.
int nfs4_FSALToFhandle | ( | nfs_fh4 * | pfh4, |
fsal_handle_t * | pfsalhandle, | ||
compound_data_t * | data | ||
) |
nfs4_FSALToFhandle: converts a FSAL file handle to a nfs4 file handle.
Converts a nfs4 file handle to a FSAL file handle.
pfh4 | [OUT] pointer to the extracted file handle |
pfsalhandle | [IN] pointer to the FSAL handle to be converted |
data | [IN] pointer to NFSv4 compound data structure. |
Definition at line 255 of file nfs_filehandle_mgmt.c.
int nfs4_Is_Fh_DSHandle | ( | nfs_fh4 * | pfh | ) |
nfs4_Is_Fh_DSHandle
This routine is used to test if a fh is a DS fh
pfh | [IN] file handle to test. |
Definition at line 595 of file nfs_filehandle_mgmt.c.
int nfs4_Is_Fh_Empty | ( | nfs_fh4 * | pfh | ) |
nfs4_Is_Fh_Empty
This routine is used to test if a fh is empty (contains no data).
pfh | [IN] file handle to test. |
Definition at line 527 of file nfs_filehandle_mgmt.c.
int nfs4_Is_Fh_Expired | ( | nfs_fh4 * | pfh | ) |
nfs4_Is_Fh_Expired
This routine is used to test if a fh is expired
pfh | [IN] file handle to test. |
Definition at line 618 of file nfs_filehandle_mgmt.c.
int nfs4_Is_Fh_Invalid | ( | nfs_fh4 * | pfh | ) |
nfs4_Is_Fh_Invalid
This routine is used to test if a fh is invalid.
pfh | [IN] file handle to test. |
Definition at line 648 of file nfs_filehandle_mgmt.c.
int nfs4_Is_Fh_Pseudo | ( | nfs_fh4 * | pfh | ) |
nfs4_Is_Fh_Pseudo
This routine is used to test if a fh refers to pseudo fs
pfh | [IN] file handle to test. |
Definition at line 572 of file nfs_filehandle_mgmt.c.
int nfs4_Is_Fh_Referral | ( | nfs_fh4 * | pfh | ) |
nfs4_Is_Fh_Referral
This routine is used to identify fh related to a pure referral
pfh | [IN] file handle to test. |
Definition at line 724 of file nfs_filehandle_mgmt.c.
int nfs4_Is_Fh_Xattr | ( | nfs_fh4 * | pfh | ) |
nfs4_Is_Fh_Xattr
This routine is used to test is a fh refers to a Xattr related stuff
pfh | [IN] file handle to test. |
Definition at line 549 of file nfs_filehandle_mgmt.c.
void nfs4_sprint_fhandle | ( | nfs_fh4 * | fh4p, |
char * | outstr | ||
) |
nfs4_sprint_fhandle : converts a file handle v4 to a string.
Converts a file handle v4 to a string. This will be used mostly for debugging purpose.
fh4p | [OUT] pointer to the file handle to be converted to a string. |
data | [INOUT] pointer to the char * resulting from the operation. |
Definition at line 941 of file nfs_filehandle_mgmt.c.
void print_buff | ( | log_components_t | component, |
char * | buff, | ||
int | len | ||
) |
print_buff
This routine prints the content of a buffer.
buff | [IN] buffer to print. |
len | [IN] length of the buffer. |
Definition at line 870 of file nfs_filehandle_mgmt.c.
void print_fhandle2 | ( | log_components_t | component, |
fhandle2 * | fh | ||
) |
print_fhandle2
This routine prints a NFSv2 file handle (for debugging purpose)
fh | [IN] file handle to print. |
Definition at line 753 of file nfs_filehandle_mgmt.c.
void print_fhandle3 | ( | log_components_t | component, |
nfs_fh3 * | fh | ||
) |
print_fhandle3
This routine prints a NFSv3 file handle (for debugging purpose)
fh | [IN] file handle to print. |
Definition at line 782 of file nfs_filehandle_mgmt.c.
void print_fhandle4 | ( | log_components_t | component, |
nfs_fh4 * | fh | ||
) |
print_fhandle4
This routine prints a NFSv4 file handle (for debugging purpose)
fh | [IN] file handle to print. |
Definition at line 811 of file nfs_filehandle_mgmt.c.
void print_fhandle_nlm | ( | log_components_t | component, |
netobj * | fh | ||
) |
print_fhandle_nlm
This routine prints a NFSv3 file handle (for debugging purpose)
fh | [IN] file handle to print. |
Definition at line 840 of file nfs_filehandle_mgmt.c.
void sprint_buff | ( | char * | str, |
char * | buff, | ||
int | len | ||
) |
Definition at line 881 of file nfs_filehandle_mgmt.c.
void sprint_fhandle2 | ( | char * | str, |
fhandle2 * | fh | ||
) |
Definition at line 764 of file nfs_filehandle_mgmt.c.
void sprint_fhandle3 | ( | char * | str, |
nfs_fh3 * | fh | ||
) |
Definition at line 793 of file nfs_filehandle_mgmt.c.
void sprint_fhandle4 | ( | char * | str, |
nfs_fh4 * | fh | ||
) |
Definition at line 822 of file nfs_filehandle_mgmt.c.
void sprint_fhandle_nlm | ( | char * | str, |
netobj * | fh | ||
) |
Definition at line 851 of file nfs_filehandle_mgmt.c.
void sprint_mem | ( | char * | str, |
char * | buff, | ||
int | len | ||
) |
Definition at line 888 of file nfs_filehandle_mgmt.c.