예제 #1
0
#include <fcntl.h>
#include <sys/types.h>
#include <sys/syscall.h>
#include <mntent.h>
#include "ganesha_list.h"
#include "fsal_internal.h"
#include "fsal_convert.h"
#include "FSAL/fsal_commonlib.h"
#include "pt_methods.h"
#include "pt_ganesha.h"

/* PT is effectively a single filesystem, describe it and assign all
 * PT handles to it.
 */
struct fsal_filesystem pt_filesystem = {
	.children = GLIST_HEAD_INIT(pt_filesystem.children),
	.exported = true,
	/** @todo fill in the following
	.dev = xxxxx,
	.fsid_tyoe = xxxx,
	.fsid = xxxx,
	*/
	.path = "/PT",
	.type = "PT",
};

/* helpers
 */

/* alloc_handle
 * allocate and fill in a handle
예제 #2
0
#include <string.h>
#include <assert.h>

#include "log.h"
#include "hashtable.h"
#include "nfs_core.h"
#include "nfs4.h"
#include "fsal.h"
#include "sal_functions.h"
#include "export_mgr.h"
#include "fsal_up.h"
#include "nfs_file_handle.h"
#include "nfs_proto_tools.h"

#ifdef DEBUG_SAL
struct glist_head state_v4_all = GLIST_HEAD_INIT(state_v4_all);
pthread_mutex_t all_state_v4_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif

/**
 * @brief adds a new state to a file
 *
 * This version of the function does not take the state lock on the
 * entry.  It exists to allow callers to integrate state into a larger
 * operation.
 *
 * The caller may have already allocated a state, in which case state
 * need not be NULL.
 *
 * @note state_lock MUST be held for write
 *