Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFSv4, NFSD: move enum nfs_cb_opnum4 to include/linux/nfs4.h

Callback operations enum is defined in client and server, move it to
common header file.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

authored by

ChenXiaoSong and committed by
Chuck Lever
52e89100 3c86e615

+23 -44
-19
fs/nfs/callback.h
··· 19 19 CB_COMPOUND = 1, 20 20 }; 21 21 22 - enum nfs4_callback_opnum { 23 - OP_CB_GETATTR = 3, 24 - OP_CB_RECALL = 4, 25 - /* Callback operations new to NFSv4.1 */ 26 - OP_CB_LAYOUTRECALL = 5, 27 - OP_CB_NOTIFY = 6, 28 - OP_CB_PUSH_DELEG = 7, 29 - OP_CB_RECALL_ANY = 8, 30 - OP_CB_RECALLABLE_OBJ_AVAIL = 9, 31 - OP_CB_RECALL_SLOT = 10, 32 - OP_CB_SEQUENCE = 11, 33 - OP_CB_WANTS_CANCELLED = 12, 34 - OP_CB_NOTIFY_LOCK = 13, 35 - OP_CB_NOTIFY_DEVICEID = 14, 36 - /* Callback operations new to NFSv4.2 */ 37 - OP_CB_OFFLOAD = 15, 38 - OP_CB_ILLEGAL = 10044, 39 - }; 40 - 41 22 struct nfs4_slot; 42 23 struct cb_process_state { 43 24 __be32 drc_status;
+1 -25
fs/nfsd/nfs4callback.c
··· 31 31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 32 */ 33 33 34 + #include <linux/nfs4.h> 34 35 #include <linux/sunrpc/clnt.h> 35 36 #include <linux/sunrpc/xprt.h> 36 37 #include <linux/sunrpc/svc_xprt.h> ··· 87 86 { 88 87 WARN_ON_ONCE(xdr_stream_encode_uint32_array(xdr, bitmap, len) < 0); 89 88 } 90 - 91 - /* 92 - * nfs_cb_opnum4 93 - * 94 - * enum nfs_cb_opnum4 { 95 - * OP_CB_GETATTR = 3, 96 - * ... 97 - * }; 98 - */ 99 - enum nfs_cb_opnum4 { 100 - OP_CB_GETATTR = 3, 101 - OP_CB_RECALL = 4, 102 - OP_CB_LAYOUTRECALL = 5, 103 - OP_CB_NOTIFY = 6, 104 - OP_CB_PUSH_DELEG = 7, 105 - OP_CB_RECALL_ANY = 8, 106 - OP_CB_RECALLABLE_OBJ_AVAIL = 9, 107 - OP_CB_RECALL_SLOT = 10, 108 - OP_CB_SEQUENCE = 11, 109 - OP_CB_WANTS_CANCELLED = 12, 110 - OP_CB_NOTIFY_LOCK = 13, 111 - OP_CB_NOTIFY_DEVICEID = 14, 112 - OP_CB_OFFLOAD = 15, 113 - OP_CB_ILLEGAL = 10044 114 - }; 115 89 116 90 static void encode_nfs_cb_opnum4(struct xdr_stream *xdr, enum nfs_cb_opnum4 op) 117 91 {
+22
include/linux/nfs4.h
··· 869 869 RCA4_TYPE_MASK_OTHER_LAYOUT_MAX = 15, 870 870 }; 871 871 872 + enum nfs_cb_opnum4 { 873 + OP_CB_GETATTR = 3, 874 + OP_CB_RECALL = 4, 875 + 876 + /* Callback operations new to NFSv4.1 */ 877 + OP_CB_LAYOUTRECALL = 5, 878 + OP_CB_NOTIFY = 6, 879 + OP_CB_PUSH_DELEG = 7, 880 + OP_CB_RECALL_ANY = 8, 881 + OP_CB_RECALLABLE_OBJ_AVAIL = 9, 882 + OP_CB_RECALL_SLOT = 10, 883 + OP_CB_SEQUENCE = 11, 884 + OP_CB_WANTS_CANCELLED = 12, 885 + OP_CB_NOTIFY_LOCK = 13, 886 + OP_CB_NOTIFY_DEVICEID = 14, 887 + 888 + /* Callback operations new to NFSv4.2 */ 889 + OP_CB_OFFLOAD = 15, 890 + 891 + OP_CB_ILLEGAL = 10044, 892 + }; 893 + 872 894 #endif