Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/include/nfs/./lm.h
Real path: /usr/include/nfs/lm.h
Zurück
/* * Copyright (c) 2005, 2022, Oracle and/or its affiliates. */ #ifndef _NFS_LM_H #define _NFS_LM_H /* * Interface definitions for the NFSv2/v3 lock manager. */ #ifdef __cplusplus extern "C" { #endif #include <sys/cred.h> #include <sys/fcntl.h> #include <sys/types.h> #include <sys/vnode.h> #include <sys/vfs.h> #include <rpc/rpc.h> #include <nfs/export.h> #ifdef _KERNEL #include <nfs/lm_intsysid.h> /* * Common interfaces. */ /* 50 msec delay for retrying sysid allocation */ #define LM_SYSID_RETRY_DELAY (hz/20) /* * Struct used to represent a host. */ struct lm_sysid; /* * struct used to represent multiple LM kernel instances. */ struct lm_rg_inst; /* * struct used for per-zone NLM globals. */ struct lm_globals; /* * struct used for sysids in each rfs_inst_t and in lm_globals for clients. */ struct lm_id; /* * Given a knetconfig and network address, returns a reference to the * associated lm_sysid. The 3rd argument is the hostname to assign to the * lm_sysid. The 4th argument is an output parameter. It is set non-zero * if the returned lm_sysid has a different protocol * (knetconfig::knc_proto) than what was requested. */ extern struct lm_sysid *lm_get_sysid(struct knetconfig *, struct netbuf *, char *, bool_t *, struct lm_id *); /* * lm_new_sysid() reserves a new numeric sysid. * lm_new_lm_sysid() generates a new lm_sysid_t item. */ extern lm_intsysid_t lm_new_sysid(krwlock_t *, bool_t *); extern struct lm_sysid *lm_new_lm_sysid(struct lm_id *, struct knetconfig *, struct netbuf *, char *, lm_intsysid_t); /* * lm_get_client_sysid() gets the client sysid storage block from lm_globals. */ extern struct lm_id *lm_get_client_sysid(void); /* * lm_rel_sysid() is used by NLM to release references to sysids * tracked in a lm_rg_inst_t->lm_sysids list. */ extern void lm_rel_sysid(struct lm_sysid *); /* * Get the number of in-use sysids for load management. */ extern uint64_t lm_get_numsysids(void); /* * Get the maximum number of sysids. */ extern uint64_t lm_get_maxsysids(void); /* * ls_destroy() destroys an lm_sysid, and is used to free data * from lm_rg_inst_t->lm_sysids lists and to free items allocated * by lm_get_me(). */ extern void ls_destroy(struct lm_id *, struct lm_sysid *); /* * Return the integer sysid for the given lm_sysid. */ extern lm_intsysid_t lm_sysidt(struct lm_sysid *); extern void lm_free_config(struct knetconfig *); extern void lm_cprsuspend(void); extern void lm_cprresume(void); /* * Client-side interfaces. */ extern int lm_frlock(struct vnode *, int, struct flock64 *, int, u_offset_t, struct cred *, netobj *, struct flk_callback *, caller_context_t *); extern int lm_has_sleep(const struct vnode *); extern void lm_register_lock_locally(vnode_t *, struct lm_sysid *, struct flock64 *, int, u_offset_t); extern int lm_safelock(vnode_t *, const struct flock64 *, cred_t *); extern int lm_safemap(const vnode_t *); extern int lm_shrlock(struct vnode *, int, struct shrlock *, int, netobj *); extern int lm4_frlock(struct vnode *, int, struct flock64 *, int, u_offset_t, struct cred *, netobj *, struct flk_callback *, caller_context_t *); extern int lm4_shrlock(struct vnode *, int, struct shrlock *, int, netobj *); /* * Server-side interfaces. */ extern void lm_unexport(struct exportinfo *, rfs_inst_t *); /* * Clustering: functions to encode the nlmid of the node where this NLM * server is running in the l_sysid of the flock struct or the s_sysid * field of the shrlock struct (respectively). */ extern void lm_set_nlmid(int32_t *); /* Hook for deleting all mandatory NFSv4 file locks held by a remote client */ extern void (*lm_remove_file_locks)(int); /* Hook for deleting NFSv4 file locks held by a remote process for a vnode */ extern void (*lm_clean_file_locks)(vnode_t *, pid_t, int); /* Detect if NLM is in grace period from NFSv4 */ extern bool_t lm_in_grace(rfs_inst_t *); extern void lm_nlm_harvest(rfs_inst_t *, fsid_t *, void **); extern int lm_nlm_install_lock(void *, rfs_inst_t *); extern void lm_unlock_all_clients(rfs_inst_t *); /* * The following global variable is the node id of the node where this * NLM server is running. */ extern int lm_global_nlmid; /* * End of clustering hooks. */ /* * Return non-zero if the given local vnode is in use. */ extern int lm_vp_active(const struct vnode *, const fsid_t *, const fid_t *); extern lm_intsysid_t lm_alloc_sysidt(void); extern void lm_free_sysidt(lm_intsysid_t); extern void lm_reap_sysids_all(void); #else /* _KERNEL */ extern int lm_shutdown(void); #endif /* _KERNEL */ #ifdef __cplusplus } #endif #endif /* _NFS_LM_H */