Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * linux/include/linux/lockd/nlm.h
0004  *
0005  * Declarations for the Network Lock Manager protocol.
0006  *
0007  * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
0008  */
0009 
0010 #ifndef LINUX_LOCKD_NLM_H
0011 #define LINUX_LOCKD_NLM_H
0012 
0013 
0014 /* Maximum file offset in file_lock.fl_end */
0015 # define NLM_OFFSET_MAX     ((s32) 0x7fffffff)
0016 # define NLM4_OFFSET_MAX    ((s64) ((~(u64)0) >> 1))
0017 
0018 /* Return states for NLM */
0019 enum {
0020     NLM_LCK_GRANTED         = 0,
0021     NLM_LCK_DENIED          = 1,
0022     NLM_LCK_DENIED_NOLOCKS      = 2,
0023     NLM_LCK_BLOCKED         = 3,
0024     NLM_LCK_DENIED_GRACE_PERIOD = 4,
0025 #ifdef CONFIG_LOCKD_V4
0026     NLM_DEADLCK         = 5,
0027     NLM_ROFS            = 6,
0028     NLM_STALE_FH            = 7,
0029     NLM_FBIG            = 8,
0030     NLM_FAILED          = 9,
0031 #endif
0032 };
0033 
0034 #define NLM_PROGRAM     100021
0035 
0036 #define NLMPROC_NULL        0
0037 #define NLMPROC_TEST        1
0038 #define NLMPROC_LOCK        2
0039 #define NLMPROC_CANCEL      3
0040 #define NLMPROC_UNLOCK      4
0041 #define NLMPROC_GRANTED     5
0042 #define NLMPROC_TEST_MSG    6
0043 #define NLMPROC_LOCK_MSG    7
0044 #define NLMPROC_CANCEL_MSG  8
0045 #define NLMPROC_UNLOCK_MSG  9
0046 #define NLMPROC_GRANTED_MSG 10
0047 #define NLMPROC_TEST_RES    11
0048 #define NLMPROC_LOCK_RES    12
0049 #define NLMPROC_CANCEL_RES  13
0050 #define NLMPROC_UNLOCK_RES  14
0051 #define NLMPROC_GRANTED_RES 15
0052 #define NLMPROC_NSM_NOTIFY  16      /* statd callback */
0053 #define NLMPROC_SHARE       20
0054 #define NLMPROC_UNSHARE     21
0055 #define NLMPROC_NM_LOCK     22
0056 #define NLMPROC_FREE_ALL    23
0057 
0058 #endif /* LINUX_LOCKD_NLM_H */