nfs-ganesha 1.4
|
Routines used for managing the NFS4 pseudo file system. More...
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <fcntl.h>
#include <sys/file.h>
#include "HashData.h"
#include "HashTable.h"
#include "log.h"
#include "ganesha_rpc.h"
#include "nfs4.h"
#include "nfs_core.h"
#include "nfs_proto_functions.h"
#include "nfs_tools.h"
#include "nfs_exports.h"
#include "nfs_file_handle.h"
#include "cache_inode.h"
Go to the source code of this file.
Defines | |
#define | NB_TOK_ARG 10 |
#define | NB_OPT_TOK 10 |
#define | NB_TOK_PATH 20 |
#define | arg_GETATTR4 op->nfs_argop4_u.opgetattr |
#define | res_GETATTR4 resp->nfs_resop4_u.opgetattr |
#define | res_ACCESS4 resp->nfs_resop4_u.opaccess |
#define | arg_ACCESS4 op->nfs_argop4_u.opaccess |
#define | arg_LOOKUP4 op->nfs_argop4_u.oplookup |
#define | res_LOOKUP4 resp->nfs_resop4_u.oplookup |
#define | arg_LOOKUPP4 op->nfs_argop4_u.oplookupp |
#define | res_LOOKUPP4 resp->nfs_resop4_u.oplookupp |
#define | arg_READDIR4 op->nfs_argop4_u.opreaddir |
#define | res_READDIR4 resp->nfs_resop4_u.opreaddir |
Functions | |
uint64_t | nfs4_PseudoToId (nfs_fh4 *fh4p) |
pseudofs_t * | nfs4_GetPseudoFs (void) |
int | nfs4_ExportToPseudoFS (exportlist_t *pexportlist) |
int | nfs4_PseudoToFattr (pseudofs_entry_t *psfsp, fattr4 *Fattr, compound_data_t *data, nfs_fh4 *objFH, bitmap4 *Bitmap) |
int | nfs4_FhandleToPseudo (nfs_fh4 *fh4p, pseudofs_t *psfstree, pseudofs_entry_t *psfsentry) |
int | nfs4_PseudoToFhandle (nfs_fh4 *fh4p, pseudofs_entry_t *psfsentry) |
int | nfs4_CreateROOTFH4 (nfs_fh4 *fh4p, compound_data_t *data) |
int | nfs4_op_getattr_pseudo (struct nfs_argop4 *op, compound_data_t *data, struct nfs_resop4 *resp) |
int | nfs4_op_access_pseudo (struct nfs_argop4 *op, compound_data_t *data, struct nfs_resop4 *resp) |
int | nfs4_op_lookup_pseudo (struct nfs_argop4 *op, compound_data_t *data, struct nfs_resop4 *resp) |
int | nfs4_op_lookupp_pseudo (struct nfs_argop4 *op, compound_data_t *data, struct nfs_resop4 *resp) |
int | nfs4_op_readdir_pseudo (struct nfs_argop4 *op, compound_data_t *data, struct nfs_resop4 *resp) |
Routines used for managing the NFS4 pseudo file system.
nfs4_pseudo.c: Routines used for managing the NFS4 pseudo file system.
Definition in file nfs4_pseudo.c.
#define arg_ACCESS4 op->nfs_argop4_u.opaccess |
Definition at line 1377 of file nfs4_pseudo.c.
#define arg_GETATTR4 op->nfs_argop4_u.opgetattr |
nfs4_op_getattr_pseudo: Gets attributes for directory in pseudo fs
Gets attributes for directory in pseudo fs. These are hardcoded constants.
op | [IN] pointer to nfs4_op arguments |
data | [INOUT] Pointer to the compound request's data |
resp | [IN] Pointer to nfs4_op results |
Definition at line 1327 of file nfs4_pseudo.c.
#define arg_LOOKUP4 op->nfs_argop4_u.oplookup |
nfs4_op_lookup_pseudo: looks up into the pseudo fs.
looks up into the pseudo fs. If a junction traversal is detected, does the necessary stuff for correcting traverse.
op | [IN] pointer to nfs4_op arguments |
data | [INOUT] Pointer to the compound request's data |
resp | [IN] Pointer to nfs4_op results |
Definition at line 1410 of file nfs4_pseudo.c.
#define arg_LOOKUPP4 op->nfs_argop4_u.oplookupp |
nfs4_op_lookupp_pseudo: looks up into the pseudo fs for the parent directory
looks up into the pseudo fs for the parent directory of the current file handle.
op | [IN] pointer to nfs4_op arguments |
data | [INOUT] Pointer to the compound request's data |
resp | [IN] Pointer to nfs4_op results |
Definition at line 1627 of file nfs4_pseudo.c.
#define arg_READDIR4 op->nfs_argop4_u.opreaddir |
nfs4_op_readdir_pseudo: Reads a directory in the pseudo fs
Reads a directory in the pseudo fs.
op | [IN] pointer to nfs4_op arguments |
data | [INOUT] Pointer to the compound request's data |
resp | [IN] Pointer to nfs4_op results |
Definition at line 1691 of file nfs4_pseudo.c.
#define NB_OPT_TOK 10 |
Definition at line 62 of file nfs4_pseudo.c.
#define NB_TOK_ARG 10 |
Definition at line 61 of file nfs4_pseudo.c.
#define NB_TOK_PATH 20 |
Definition at line 63 of file nfs4_pseudo.c.
#define res_ACCESS4 resp->nfs_resop4_u.opaccess |
nfs4_op_access_pseudo: Checks for object accessibility in pseudo fs.
Checks for object accessibility in pseudo fs. All entries in pseudo fs return can't be accessed as ACCESS4_MODIFY|ACCESS4_EXTEND|ACCESS4_DELETE because pseudo fs is behaving as a read-only fs.
op | [IN] pointer to nfs4_op arguments |
data | [INOUT] Pointer to the compound request's data |
resp | [IN] Pointer to nfs4_op results |
Definition at line 1376 of file nfs4_pseudo.c.
#define res_GETATTR4 resp->nfs_resop4_u.opgetattr |
Definition at line 1328 of file nfs4_pseudo.c.
#define res_LOOKUP4 resp->nfs_resop4_u.oplookup |
Definition at line 1411 of file nfs4_pseudo.c.
#define res_LOOKUPP4 resp->nfs_resop4_u.oplookupp |
Definition at line 1628 of file nfs4_pseudo.c.
#define res_READDIR4 resp->nfs_resop4_u.opreaddir |
Definition at line 1692 of file nfs4_pseudo.c.
int nfs4_CreateROOTFH4 | ( | nfs_fh4 * | fh4p, |
compound_data_t * | data | ||
) |
nfs4_CreateROOTFH: Creates the file handle for the "/" of the pseudo file system
Creates the file handle for the "/" of the pseudo file syste.
fh4p | [OUT] pointer to the file handle to be allocated |
data | [INOUT] pointer to the compound request's data |
Definition at line 1282 of file nfs4_pseudo.c.
int nfs4_FhandleToPseudo | ( | nfs_fh4 * | fh4p, |
pseudofs_t * | psfstree, | ||
pseudofs_entry_t * | psfsentry | ||
) |
nfs4_FhandleToPseudo: converts a NFSv4 file handle fs to an id in the pseudo
Converts a NFSv4 file handle fs to an id in the pseudo, and check if the fh is related to a pseudo entry
fh4p | [IN] pointer to nfsv4 filehandle |
psfsentry | [OUT] pointer to pseudofs entry |
Definition at line 1221 of file nfs4_pseudo.c.
nfs4_PseudoToId: TConverts a file handle (to a pseudo object) to the id of this pseudo object in the pseudofs
This routine merely extracts a field from the file handle which is not seen as opaque in this case. Because file handle are opaque structure, it is prefered to have a dedicated function for this and so hiding the file handle internal structure.
fh4p | [IN] pointer to the file handle to process. |
Definition at line 81 of file nfs4_pseudo.c.