Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /* -*- mode: c; c-basic-offset: 8; -*-
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * vim: noexpandtab sw=8 ts=8 sts=0:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * dlmapi.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  * externally exported dlm interfaces
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  * Copyright (C) 2004 Oracle.  All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #ifndef DLMAPI_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #define DLMAPI_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) struct dlm_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) struct dlm_ctxt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) /* NOTE: changes made to this enum should be reflected in dlmdebug.c */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) enum dlm_status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	DLM_NORMAL = 0,           /*  0: request in progress */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	DLM_GRANTED,              /*  1: request granted */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	DLM_DENIED,               /*  2: request denied */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	DLM_DENIED_NOLOCKS,       /*  3: request denied, out of system resources */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	DLM_WORKING,              /*  4: async request in progress */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	DLM_BLOCKED,              /*  5: lock request blocked */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	DLM_BLOCKED_ORPHAN,       /*  6: lock request blocked by a orphan lock*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	DLM_DENIED_GRACE_PERIOD,  /*  7: topological change in progress */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	DLM_SYSERR,               /*  8: system error */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	DLM_NOSUPPORT,            /*  9: unsupported */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	DLM_CANCELGRANT,          /* 10: can't cancel convert: already granted */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	DLM_IVLOCKID,             /* 11: bad lockid */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	DLM_SYNC,                 /* 12: synchronous request granted */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	DLM_BADTYPE,              /* 13: bad resource type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	DLM_BADRESOURCE,          /* 14: bad resource handle */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	DLM_MAXHANDLES,           /* 15: no more resource handles */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	DLM_NOCLINFO,             /* 16: can't contact cluster manager */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	DLM_NOLOCKMGR,            /* 17: can't contact lock manager */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	DLM_NOPURGED,             /* 18: can't contact purge daemon */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	DLM_BADARGS,              /* 19: bad api args */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	DLM_VOID,                 /* 20: no status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	DLM_NOTQUEUED,            /* 21: NOQUEUE was specified and request failed */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	DLM_IVBUFLEN,             /* 22: invalid resource name length */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	DLM_CVTUNGRANT,           /* 23: attempted to convert ungranted lock */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	DLM_BADPARAM,             /* 24: invalid lock mode specified */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	DLM_VALNOTVALID,          /* 25: value block has been invalidated */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	DLM_REJECTED,             /* 26: request rejected, unrecognized client */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	DLM_ABORT,                /* 27: blocked lock request cancelled */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	DLM_CANCEL,               /* 28: conversion request cancelled */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	DLM_IVRESHANDLE,          /* 29: invalid resource handle */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	DLM_DEADLOCK,             /* 30: deadlock recovery refused this request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	DLM_DENIED_NOASTS,        /* 31: failed to allocate AST */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	DLM_FORWARD,              /* 32: request must wait for primary's response */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	DLM_TIMEOUT,              /* 33: timeout value for lock has expired */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	DLM_IVGROUPID,            /* 34: invalid group specification */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	DLM_VERS_CONFLICT,        /* 35: version conflicts prevent request handling */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	DLM_BAD_DEVICE_PATH,      /* 36: Locks device does not exist or path wrong */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	DLM_NO_DEVICE_PERMISSION, /* 37: Client has insufficient pers for device */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	DLM_NO_CONTROL_DEVICE,    /* 38: Cannot set options on opened device */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	DLM_RECOVERING,           /* 39: extension, allows caller to fail a lock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 				     request if it is being recovered */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	DLM_MIGRATING,            /* 40: extension, allows caller to fail a lock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 				     request if it is being migrated */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	DLM_MAXSTATS,             /* 41: upper limit for return code validation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) /* for pretty-printing dlm_status error messages */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) const char *dlm_errmsg(enum dlm_status err);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) /* for pretty-printing dlm_status error names */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) const char *dlm_errname(enum dlm_status err);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) /* Eventually the DLM will use standard errno values, but in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)  * meantime this lets us track dlm errors as they bubble up. When we
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)  * bring its error reporting into line with the rest of the stack,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)  * these can just be replaced with calls to mlog_errno. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) #define dlm_error(st) do {						\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	if ((st) != DLM_RECOVERING &&					\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	    (st) != DLM_MIGRATING &&					\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	    (st) != DLM_FORWARD)					\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 		mlog(ML_ERROR, "dlm status = %s\n", dlm_errname((st)));	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) } while (0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) #define DLM_LKSB_UNUSED1           0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) #define DLM_LKSB_PUT_LVB           0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) #define DLM_LKSB_GET_LVB           0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) #define DLM_LKSB_UNUSED2           0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) #define DLM_LKSB_UNUSED3           0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) #define DLM_LKSB_UNUSED4           0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) #define DLM_LKSB_UNUSED5           0x40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) #define DLM_LKSB_UNUSED6           0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) #define DLM_LVB_LEN  64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) /* Callers are only allowed access to the lvb and status members of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95)  * this struct. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) struct dlm_lockstatus {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	enum dlm_status status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	struct dlm_lock *lockid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	char lvb[DLM_LVB_LEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) /* Valid lock modes. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) #define LKM_IVMODE      (-1)            /* invalid mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) #define LKM_NLMODE      0               /* null lock */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) #define LKM_CRMODE      1               /* concurrent read    unsupported */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) #define LKM_CWMODE      2               /* concurrent write   unsupported */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) #define LKM_PRMODE      3               /* protected read */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) #define LKM_PWMODE      4               /* protected write    unsupported */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) #define LKM_EXMODE      5               /* exclusive */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) #define LKM_MAXMODE     5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) #define LKM_MODEMASK    0xff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) /* Flags passed to dlmlock and dlmunlock:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)  * reserved: flags used by the "real" dlm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)  * only a few are supported by this dlm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)  * (U) = unsupported by ocfs2 dlm */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) #define LKM_ORPHAN       0x00000010  /* this lock is orphanable (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) #define LKM_PARENTABLE   0x00000020  /* this lock was orphaned (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) #define LKM_BLOCK        0x00000040  /* blocking lock request (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) #define LKM_LOCAL        0x00000080  /* local lock request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) #define LKM_VALBLK       0x00000100  /* lock value block request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) #define LKM_NOQUEUE      0x00000200  /* non blocking request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) #define LKM_CONVERT      0x00000400  /* conversion request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) #define LKM_NODLCKWT     0x00000800  /* this lock wont deadlock (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) #define LKM_UNLOCK       0x00001000  /* deallocate this lock */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) #define LKM_CANCEL       0x00002000  /* cancel conversion request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) #define LKM_DEQALL       0x00004000  /* remove all locks held by proc (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) #define LKM_INVVALBLK    0x00008000  /* invalidate lock value block */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) #define LKM_SYNCSTS      0x00010000  /* return synchronous status if poss (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) #define LKM_TIMEOUT      0x00020000  /* lock request contains timeout (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) #define LKM_SNGLDLCK     0x00040000  /* request can self-deadlock (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) #define LKM_FINDLOCAL    0x00080000  /* find local lock request (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) #define LKM_PROC_OWNED   0x00100000  /* owned by process, not group (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) #define LKM_XID          0x00200000  /* use transaction id for deadlock (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) #define LKM_XID_CONFLICT 0x00400000  /* do not allow lock inheritance (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) #define LKM_FORCE        0x00800000  /* force unlock flag */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) #define LKM_REVVALBLK    0x01000000  /* temporary solution: re-validate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 					lock value block (U) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) /* unused */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) #define LKM_UNUSED1      0x00000001  /* unused */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) #define LKM_UNUSED2      0x00000002  /* unused */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) #define LKM_UNUSED3      0x00000004  /* unused */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) #define LKM_UNUSED4      0x00000008  /* unused */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) #define LKM_UNUSED5      0x02000000  /* unused */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) #define LKM_UNUSED6      0x04000000  /* unused */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) #define LKM_UNUSED7      0x08000000  /* unused */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) /* ocfs2 extensions: internal only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)  * should never be used by caller */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) #define LKM_MIGRATION    0x10000000  /* extension: lockres is to be migrated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 					to another node */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) #define LKM_PUT_LVB      0x20000000  /* extension: lvb is being passed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 					should be applied to lockres */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) #define LKM_GET_LVB      0x40000000  /* extension: lvb should be copied
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 					from lockres when lock is granted */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) #define LKM_RECOVERY     0x80000000  /* extension: flag for recovery lock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 					used to avoid recovery rwsem */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) typedef void (dlm_astlockfunc_t)(void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) typedef void (dlm_bastlockfunc_t)(void *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) typedef void (dlm_astunlockfunc_t)(void *, enum dlm_status);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) enum dlm_status dlmlock(struct dlm_ctxt *dlm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 			int mode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 			struct dlm_lockstatus *lksb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 			int flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 			const char *name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 			int namelen,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 			dlm_astlockfunc_t *ast,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 			void *data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 			dlm_bastlockfunc_t *bast);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) enum dlm_status dlmunlock(struct dlm_ctxt *dlm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 			  struct dlm_lockstatus *lksb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 			  int flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 			  dlm_astunlockfunc_t *unlockast,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 			  void *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) struct dlm_protocol_version {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	u8 pv_major;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	u8 pv_minor;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) struct dlm_ctxt * dlm_register_domain(const char *domain, u32 key,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 				      struct dlm_protocol_version *fs_proto);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) void dlm_unregister_domain(struct dlm_ctxt *dlm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) void dlm_print_one_lock(struct dlm_lock *lockid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) typedef void (dlm_eviction_func)(int, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) struct dlm_eviction_cb {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	struct list_head        ec_item;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	dlm_eviction_func       *ec_func;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	void                    *ec_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) void dlm_setup_eviction_cb(struct dlm_eviction_cb *cb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 			   dlm_eviction_func *f,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 			   void *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) void dlm_register_eviction_cb(struct dlm_ctxt *dlm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 			      struct dlm_eviction_cb *cb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) void dlm_unregister_eviction_cb(struct dlm_eviction_cb *cb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) #endif /* DLMAPI_H */