From patchwork Sun Sep 27 16:50:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 50328 Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8RGvMvx018663 for ; Sun, 27 Sep 2009 16:57:22 GMT Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id D5BAAAD0A4; Sun, 27 Sep 2009 10:56:53 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=3.8 tests=AWL, BAYES_00, NO_MORE_FUNN, SPF_PASS autolearn=no version=3.2.5 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.120]) by lists.samba.org (Postfix) with ESMTP id 47123AD0A4 for ; Sun, 27 Sep 2009 10:56:48 -0600 (MDT) Received: from mail.poochiereds.net ([71.70.153.3]) by cdptpa-omta02.mail.rr.com with ESMTP id <20090927165715690.BYLP6584@cdptpa-omta02.mail.rr.com>; Sun, 27 Sep 2009 16:57:15 +0000 Received: by mail.poochiereds.net (Postfix, from userid 4447) id 561DE58173; Sun, 27 Sep 2009 12:50:31 -0400 (EDT) From: Jeff Layton To: linux-nfs@vger.kernel.org, linux-cifs-client@lists.samba.org Date: Sun, 27 Sep 2009 12:50:29 -0400 Message-Id: <1254070230-13125-9-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1254070230-13125-1-git-send-email-jlayton@redhat.com> References: <1254070230-13125-1-git-send-email-jlayton@redhat.com> Subject: [linux-cifs-client] [RFC PATCH 8/9] sunrpc: add Kconfig option for CONFIG_SUNRPC_SMB X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-cifs-client-bounces@lists.samba.org Errors-To: linux-cifs-client-bounces@lists.samba.org ...and the necessary Makefile bits so to compile support into the sunrpc module. Signed-off-by: Jeff Layton --- net/sunrpc/Kconfig | 11 +++++++++++ net/sunrpc/Makefile | 1 + net/sunrpc/sunrpc_syms.c | 3 +++ net/sunrpc/xprtsmb.c | 7 +++++-- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/Kconfig b/net/sunrpc/Kconfig index 443c161..63f5ee7 100644 --- a/net/sunrpc/Kconfig +++ b/net/sunrpc/Kconfig @@ -54,3 +54,14 @@ config RPCSEC_GSS_SPKM3 available from http://linux-nfs.org/. If unsure, say N. + +config SUNRPC_SMB + bool "SMB/CIFS Transport for the SUNRPC Layer (EXPERIMENTAL)" + depends on SUNRPC && EXPERIMENTAL + help + This option adds the ability for the kernels SUNRPC Layer to + send and receive Sever Message Block (SMB) traffic. This + protocol is widely used by Microsoft Windows servers for + filesharing. + + If unsure, say N. diff --git a/net/sunrpc/Makefile b/net/sunrpc/Makefile index 9d2fca5..691e62f 100644 --- a/net/sunrpc/Makefile +++ b/net/sunrpc/Makefile @@ -16,3 +16,4 @@ sunrpc-y := clnt.o xprt.o socklib.o xprtsock.o sched.o \ sunrpc-$(CONFIG_NFS_V4_1) += backchannel_rqst.o bc_svc.o sunrpc-$(CONFIG_PROC_FS) += stats.o sunrpc-$(CONFIG_SYSCTL) += sysctl.o +sunrpc-$(CONFIG_SUNRPC_SMB) += xprtsmb.o smb.o diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c index 8cce921..65b4dec 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c @@ -21,6 +21,7 @@ #include #include #include +#include extern struct cache_detail ip_map_cache, unix_gid_cache; @@ -45,6 +46,7 @@ init_sunrpc(void) cache_register(&unix_gid_cache); svc_init_xprt_sock(); /* svc sock transport */ init_socket_xprt(); /* clnt sock transport */ + init_smb_xprt(); rpcauth_init_module(); out: return err; @@ -54,6 +56,7 @@ static void __exit cleanup_sunrpc(void) { rpcauth_remove_module(); + cleanup_smb_xprt(); cleanup_socket_xprt(); svc_cleanup_xprt_sock(); unregister_rpc_pipefs(); diff --git a/net/sunrpc/xprtsmb.c b/net/sunrpc/xprtsmb.c index 585cf37..362600a 100644 --- a/net/sunrpc/xprtsmb.c +++ b/net/sunrpc/xprtsmb.c @@ -1691,7 +1691,8 @@ static struct xprt_class xs_smb_transport = { * init_socket_xprt - set up xprtsock's sysctls, register with RPC client * */ -int init_smb_xprt(void) +int +init_smb_xprt(void) { #ifdef RPC_DEBUG if (!sunrpc_table_header) @@ -1707,7 +1708,8 @@ int init_smb_xprt(void) * cleanup_socket_xprt - remove xprtsock's sysctls, unregister * */ -void cleanup_smb_xprt(void) +void +cleanup_smb_xprt(void) { #ifdef RPC_DEBUG if (sunrpc_table_header) { @@ -1718,3 +1720,4 @@ void cleanup_smb_xprt(void) xprt_unregister_transport(&xs_smb_transport); } +