Skip to contentSkip to conversation

smb: smbdirect: move fs/smb/common/smbdirect/ to fs/smb/smbdirect/

PATCH In review Stefan Metzmacher 6 participants 8 messages Apr 19 – Apr 23

Subsystems (8)
lore
Share & tools
lore

Stefan Metzmacher

author reviewer
#0 lore raw

PATCH 1/1 smb: smbdirect: move fs/smb/common/smbdirect/ to fs/smb/smbdirect/

This also removes the smbdirect_ prefix from the files.

---
 MAINTAINERS                                    |  2 +-
 fs/smb/Kconfig                                 |  2 +-
 fs/smb/Makefile                                |  1 +
 fs/smb/client/Kconfig                          |  2 +-
 fs/smb/client/smbdirect.c                      |  2 +-
 fs/smb/client/smbdirect.h                      |  2 +-
 fs/smb/common/Makefile                         |  1 -
 fs/smb/common/smbdirect/Makefile               | 18 ------------------
 fs/smb/server/Kconfig                          |  2 +-
 fs/smb/server/transport_rdma.c                 |  2 +-
 fs/smb/server/transport_rdma.h                 |  2 +-
 fs/smb/{common => }/smbdirect/Kconfig          |  2 +-
 fs/smb/smbdirect/Makefile                      | 18 ++++++++++++++++++
 .../smbdirect_accept.c => smbdirect/accept.c}  |  4 ++--
 .../connect.c}                                 |  4 ++--
 .../connection.c}                              |  2 +-
 .../smbdirect_debug.c => smbdirect/debug.c}    |  2 +-
 .../devices.c}                                 |  2 +-
 .../internal.h}                                |  6 +++---
 .../smbdirect_listen.c => smbdirect/listen.c}  |  2 +-
 .../smbdirect_main.c => smbdirect/main.c}      |  2 +-
 .../smbdirect_mr.c => smbdirect/mr.c}          |  2 +-
 .../smbdirect_pdu.h => smbdirect/pdu.h}        |  0
 .../smbdirect_public.h => smbdirect/public.h}  |  0
 .../smbdirect_rw.c => smbdirect/rw.c}          |  2 +-
 fs/smb/{common => }/smbdirect/smbdirect.h      |  0
 .../smbdirect_socket.c => smbdirect/socket.c}  |  2 +-
 .../smbdirect_socket.h => smbdirect/socket.h}  |  0
 28 files changed, 43 insertions(+), 43 deletions(-)
 delete mode 100644 fs/smb/common/smbdirect/Makefile
 rename fs/smb/{common => }/smbdirect/Kconfig (86%)
 create mode 100644 fs/smb/smbdirect/Makefile
 rename fs/smb/{common/smbdirect/smbdirect_accept.c => smbdirect/accept.c} (99%)
 rename fs/smb/{common/smbdirect/smbdirect_connect.c => smbdirect/connect.c} (99%)
 rename fs/smb/{common/smbdirect/smbdirect_connection.c => smbdirect/connection.c} (99%)
 rename fs/smb/{common/smbdirect/smbdirect_debug.c => smbdirect/debug.c} (98%)
 rename fs/smb/{common/smbdirect/smbdirect_devices.c => smbdirect/devices.c} (99%)
 rename fs/smb/{common/smbdirect/smbdirect_internal.h => smbdirect/internal.h} (98%)
 rename fs/smb/{common/smbdirect/smbdirect_listen.c => smbdirect/listen.c} (99%)
 rename fs/smb/{common/smbdirect/smbdirect_main.c => smbdirect/main.c} (99%)
 rename fs/smb/{common/smbdirect/smbdirect_mr.c => smbdirect/mr.c} (99%)
 rename fs/smb/{common/smbdirect/smbdirect_pdu.h => smbdirect/pdu.h} (100%)
 rename fs/smb/{common/smbdirect/smbdirect_public.h => smbdirect/public.h} (100%)
 rename fs/smb/{common/smbdirect/smbdirect_rw.c => smbdirect/rw.c} (99%)
 rename fs/smb/{common => }/smbdirect/smbdirect.h (100%)
 rename fs/smb/{common/smbdirect/smbdirect_socket.c => smbdirect/socket.c} (99%)
 rename fs/smb/{common/smbdirect/smbdirect_socket.h => smbdirect/socket.h} (100%)
MAINTAINERS +1 -1
index 13f49378b157..ea24891eca5f 100644
@@ -24613,7 +24613,7 @@ L:	[email protected]
 L:	[email protected] (moderated for non-subscribers)
 S:	Maintained
 F:	fs/smb/client/smbdirect.*
-F:	fs/smb/common/smbdirect/
+F:	fs/smb/smbdirect/
 F:	fs/smb/server/transport_rdma.*
 
 SMC91x ETHERNET DRIVER
fs/smb/Kconfig +1 -1
index b4b2cfdc2a6b..e549e189ee6a 100644
@@ -4,7 +4,7 @@
 
 source "fs/smb/client/Kconfig"
 source "fs/smb/server/Kconfig"
-source "fs/smb/common/smbdirect/Kconfig"
+source "fs/smb/smbdirect/Kconfig"
 
 config SMBFS
 	tristate
fs/smb/Makefile +1 -0
index 9a1bf59a1a65..353b1c2eefc4 100644
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_SMBFS)		+= common/
+obj-$(CONFIG_SMBDIRECT)		+= smbdirect/
 obj-$(CONFIG_CIFS)		+= client/
 obj-$(CONFIG_SMB_SERVER)	+= server/
fs/smb/client/Kconfig +1 -1
index 63831242fddf..fed621910876 100644
@@ -182,7 +182,7 @@ config CIFS_SMB_DIRECT
 	bool "SMB Direct support"
 	depends on CIFS && INFINIBAND && INFINIBAND_ADDR_TRANS
 	depends on CIFS=m || INFINIBAND=y
-	select SMB_COMMON_SMBDIRECT
+	select SMBDIRECT
 	help
 	  Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
 	  SMB Direct allows transferring SMB packets over RDMA. If unsure,
fs/smb/client/smbdirect.c +1 -1
index 9e67adcdc7d3..75f9f91a7ec9 100644
@@ -9,7 +9,7 @@
 #include "cifs_debug.h"
 #include "cifsproto.h"
 #include "smb2proto.h"
-#include "../common/smbdirect/smbdirect_public.h"
+#include "../smbdirect/public.h"
 
 /* Port numbers for SMBD transport */
 #define SMB_PORT	445
fs/smb/client/smbdirect.h +1 -1
index 0017d5b2de44..287ac849213d 100644
@@ -12,7 +12,7 @@
 
 #include "cifsglob.h"
 
-#include "../common/smbdirect/smbdirect.h"
+#include "../smbdirect/smbdirect.h"
 
 extern int rdma_readwrite_threshold;
 extern int smbd_max_frmr_depth;
fs/smb/common/Makefile +0 -1
index e6ee65c31b5d..9e0730a385fb 100644
@@ -4,4 +4,3 @@
 #
 
 obj-$(CONFIG_SMBFS) += cifs_md4.o
-obj-$(CONFIG_SMB_COMMON_SMBDIRECT) += smbdirect/
fs/smb/common/smbdirect/Makefile deleted +0 -18
deleted file mode 100644
index 423f533e1002..000000000000
@@ -1,18 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-or-later
-#
-# Makefile for smbdirect support
-#
-
-obj-$(CONFIG_SMB_COMMON_SMBDIRECT) += smbdirect.o
-
-smbdirect-y := \
-	smbdirect_socket.o	\
-	smbdirect_connection.o	\
-	smbdirect_mr.o		\
-	smbdirect_rw.o		\
-	smbdirect_debug.o	\
-	smbdirect_connect.o	\
-	smbdirect_listen.o	\
-	smbdirect_accept.o	\
-	smbdirect_devices.o	\
-	smbdirect_main.o
fs/smb/server/Kconfig +1 -1
index 37387410e5bb..8f15c5fd6d88 100644
@@ -49,7 +49,7 @@ config SMB_SERVER_SMBDIRECT
 	bool "Support for SMB Direct protocol"
 	depends on SMB_SERVER && INFINIBAND && INFINIBAND_ADDR_TRANS
 	depends on SMB_SERVER=m || INFINIBAND=y
-	select SMB_COMMON_SMBDIRECT
+	select SMBDIRECT
 	default n
 
 	help
fs/smb/server/transport_rdma.c +1 -1
index 706a2c897948..a8242c00096f 100644
@@ -18,7 +18,7 @@
 #include "smb_common.h"
 #include "../common/smb2status.h"
 #include "transport_rdma.h"
-#include "../common/smbdirect/smbdirect_public.h"
+#include "../smbdirect/public.h"
 
 
 #define SMB_DIRECT_PORT_IWARP		5445
fs/smb/server/transport_rdma.h +1 -1
index 05352dc47f95..bde3d88aecc7 100644
@@ -25,6 +25,6 @@ static inline void init_smbd_max_io_size(unsigned int sz) { }
 static inline unsigned int get_smbd_max_read_write_size(struct ksmbd_transport *kt) { return 0; }
 #endif
 
-#include "../common/smbdirect/smbdirect.h"
+#include "../smbdirect/smbdirect.h"
 
 #endif /* __KSMBD_TRANSPORT_RDMA_H__ */
fs/smb/smbdirect/Kconfig renamed from fs/smb/common/smbdirect/Kconfig +1 -1
similarity index 86%
rename from fs/smb/common/smbdirect/Kconfig
rename to fs/smb/smbdirect/Kconfig
index a46a2e6ec87a..2bf1b3350f7d 100644
@@ -2,7 +2,7 @@
 #
 # smbdirect configuration
 
-config SMB_COMMON_SMBDIRECT
+config SMBDIRECT
 	def_tristate n
 	depends on INFINIBAND && INFINIBAND_ADDR_TRANS
 	depends on m || INFINIBAND=y
fs/smb/smbdirect/Makefile new file +18 -0
new file mode 100644
index 000000000000..80d6025984d1
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Makefile for smbdirect support
+#
+
+obj-$(CONFIG_SMBDIRECT) += smbdirect.o
+
+smbdirect-y := \
+	socket.o	\
+	connection.o	\
+	mr.o		\
+	rw.o		\
+	debug.o		\
+	connect.o	\
+	listen.o	\
+	accept.o	\
+	devices.o	\
+	main.o
fs/smb/smbdirect/accept.c renamed from fs/smb/common/smbdirect/smbdirect_accept.c +2 -2
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_accept.c
rename to fs/smb/smbdirect/accept.c
index d6d5e6a3f5de..704b271af3a8 100644
@@ -5,9 +5,9 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 #include <net/sock.h>
-#include "../../common/smb2status.h"
+#include "../common/smb2status.h"
 
 static int smbdirect_accept_rdma_event_handler(struct rdma_cm_id *id,
 					       struct rdma_cm_event *event);
fs/smb/smbdirect/connect.c renamed from fs/smb/common/smbdirect/smbdirect_connect.c +2 -2
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_connect.c
rename to fs/smb/smbdirect/connect.c
index 2b54f79dba43..8addee43a381 100644
@@ -3,8 +3,8 @@
  *   Copyright (c) 2012,2016,2017,2025 Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
-#include "../../common/smb2status.h"
+#include "internal.h"
+#include "../common/smb2status.h"
 
 static int smbdirect_connect_setup_connection(struct smbdirect_socket *sc);
 static int smbdirect_connect_resolve_addr(struct smbdirect_socket *sc,
fs/smb/smbdirect/connection.c renamed from fs/smb/common/smbdirect/smbdirect_connection.c +1 -1
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_connection.c
rename to fs/smb/smbdirect/connection.c
index 7e4921b9538c..822366718d45 100644
@@ -4,7 +4,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 #include <linux/folio_queue.h>
 
 struct smbdirect_map_sges {
fs/smb/smbdirect/debug.c renamed from fs/smb/common/smbdirect/smbdirect_debug.c +1 -1
similarity index 98%
rename from fs/smb/common/smbdirect/smbdirect_debug.c
rename to fs/smb/smbdirect/debug.c
index d8664fd7f71a..a66a19d4a463 100644
@@ -4,7 +4,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 #include <linux/seq_file.h>
 
 void smbdirect_connection_legacy_debug_proc_show(struct smbdirect_socket *sc,
fs/smb/smbdirect/devices.c renamed from fs/smb/common/smbdirect/smbdirect_devices.c +1 -1
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_devices.c
rename to fs/smb/smbdirect/devices.c
index aaab99e9c045..44962f221c35 100644
@@ -5,7 +5,7 @@
  *   Copyright (c) 2025 Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 
 static u8 smbdirect_ib_device_rdma_capable_node_type(struct ib_device *ib_dev)
 {
fs/smb/smbdirect/internal.h renamed from fs/smb/common/smbdirect/smbdirect_internal.h +3 -3
similarity index 98%
rename from fs/smb/common/smbdirect/smbdirect_internal.h
rename to fs/smb/smbdirect/internal.h
index 30a1b8643657..2d5acf2c21bc 100644
@@ -9,8 +9,8 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include "smbdirect.h"
-#include "smbdirect_pdu.h"
-#include "smbdirect_public.h"
+#include "pdu.h"
+#include "public.h"
 
 #include <linux/mutex.h>
 
@@ -34,7 +34,7 @@ struct smbdirect_module_state {
 
 extern struct smbdirect_module_state smbdirect_globals;
 
-#include "smbdirect_socket.h"
+#include "socket.h"
 
 struct smbdirect_device {
 	struct list_head list;
fs/smb/smbdirect/listen.c renamed from fs/smb/common/smbdirect/smbdirect_listen.c +1 -1
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_listen.c
rename to fs/smb/smbdirect/listen.c
index 05c7902e7020..143a7618d95f 100644
@@ -5,7 +5,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 
 static int smbdirect_listen_rdma_event_handler(struct rdma_cm_id *id,
 					       struct rdma_cm_event *event);
fs/smb/smbdirect/main.c renamed from fs/smb/common/smbdirect/smbdirect_main.c +1 -1
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_main.c
rename to fs/smb/smbdirect/main.c
index fe6e8d93c34c..606732fefb69 100644
@@ -3,7 +3,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 #include <linux/module.h>
 
 struct smbdirect_module_state smbdirect_globals = {
fs/smb/smbdirect/mr.c renamed from fs/smb/common/smbdirect/smbdirect_mr.c +1 -1
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_mr.c
rename to fs/smb/smbdirect/mr.c
index fa9be8089925..5228e699cd5d 100644
@@ -4,7 +4,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 
 /*
  * Allocate MRs used for RDMA read/write
fs/smb/smbdirect/pdu.h renamed from fs/smb/common/smbdirect/smbdirect_pdu.h +0 -0
similarity index 100%
rename from fs/smb/common/smbdirect/smbdirect_pdu.h
rename to fs/smb/smbdirect/pdu.h
fs/smb/smbdirect/public.h renamed from fs/smb/common/smbdirect/smbdirect_public.h +0 -0
similarity index 100%
rename from fs/smb/common/smbdirect/smbdirect_public.h
rename to fs/smb/smbdirect/public.h
fs/smb/smbdirect/rw.c renamed from fs/smb/common/smbdirect/smbdirect_rw.c +1 -1
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_rw.c
rename to fs/smb/smbdirect/rw.c
index 3b2eb8c48efc..c2f46b17731e 100644
@@ -5,7 +5,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 
 static int smbdirect_connection_wait_for_rw_credits(struct smbdirect_socket *sc,
 						    int credits)
fs/smb/smbdirect/smbdirect.h renamed from fs/smb/common/smbdirect/smbdirect.h +0 -0
similarity index 100%
rename from fs/smb/common/smbdirect/smbdirect.h
rename to fs/smb/smbdirect/smbdirect.h
fs/smb/smbdirect/socket.c renamed from fs/smb/common/smbdirect/smbdirect_socket.c +1 -1
similarity index 99%
rename from fs/smb/common/smbdirect/smbdirect_socket.c
rename to fs/smb/smbdirect/socket.c
index 9153e1dbf53d..1b4ab01b745e 100644
@@ -4,7 +4,7 @@
  *   Copyright (c) 2025, Stefan Metzmacher
  */
 
-#include "smbdirect_internal.h"
+#include "internal.h"
 
 bool smbdirect_frwr_is_supported(const struct ib_device_attr *attrs)
 {
fs/smb/smbdirect/socket.h renamed from fs/smb/common/smbdirect/smbdirect_socket.h +0 -0
similarity index 100%
rename from fs/smb/common/smbdirect/smbdirect_socket.h
rename to fs/smb/smbdirect/socket.h
Signature · 1 line
2.43.0
#1 lore raw

fs/smb/Makefile line 4

Quoted 9 lines
fs/smb/Makefile +1 -0
index 9a1bf59a1a65..353b1c2eefc4 100644
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_SMBFS)		+= common/
+obj-$(CONFIG_SMBDIRECT)		+= smbdirect/

Why is this not in net/smbdirect/ or driver/infiniband/ulp/smdirect?

As far as I can tell there is zero file system logic in this code.

fs/smb/Makefile line 5

Quoted 2 lines
fs/smb/Makefile +1 -1
-#include "../common/smbdirect/smbdirect_public.h"
+#include "../smbdirect/public.h"

And all these relative includes suggest you really want a include/linux/smdirect/ instead.

While we're at it: __SMBDIRECT_EXPORT_SYMBOL__ is really odd. One thing is the __ pre- and postfix that make it look weird.

The other is that EXPORT_SYMBOL_FOR_MODULES is for very specific symbols that really should not exported. What this warrants instead is a normal EXPORT_SYMBOL_NS_GPL.

author reviewer
#2 lore raw

Hi Christoph,

Quoted 11 lines

fs/smb/Makefile line 4

Quoted 9 lines
fs/smb/Makefile +1 -0
index 9a1bf59a1a65..353b1c2eefc4 100644
@@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
 
  obj-$(CONFIG_SMBFS)		+= common/
+obj-$(CONFIG_SMBDIRECT)		+= smbdirect/

Why is this not in net/smbdirect/ or driver/infiniband/ulp/smdirect?

Yes, I also thought about net/smbdirect.

As IPPROTO_SMBDIRECT or PF_SMBDIRECT will be the next step, see the open discussion here:
https://lore.kernel.org/linux-cifs/[email protected]/
(I'll follow with that discussion soon)

I was just unsure about the consequences, e.g. would the maintainer/pull request flow have to change in that case? Or would Steve be able to take the changes via his trees? Any I also didn't want to offend anybody, so I just took what Linus proposed.

Using driver/infiniband/ulp/smdirect would also work, if everybody prefer that.

Quoted 7 lines

As far as I can tell there is zero file system logic in this code.

fs/smb/Makefile line 5

Quoted 2 lines
fs/smb/Makefile +1 -1
-#include "../common/smbdirect/smbdirect_public.h"
+#include "../smbdirect/public.h"

And all these relative includes suggest you really want a include/linux/smdirect/ instead.

Yes, that's my also my goal in the next steps.

Quoted 2 lines

While we're at it: __SMBDIRECT_EXPORT_SYMBOL__ is really odd. One thing is the __ pre- and postfix that make it look weird.

Yes, the __SMBDIRECT_EXPORT_SYMBOL__ was mainly a temporary thing, now it's useless and I'll remove it.

Quoted 3 lines

The other is that EXPORT_SYMBOL_FOR_MODULES is for very specific symbols that really should not exported. What this warrants instead is a normal EXPORT_SYMBOL_NS_GPL.

I want the exported functions be minimal, as most of of should go via the socket layer instead.

If EXPORT_SYMBOL_NS_GPL(func, "smbdirect") is better than EXPORT_SYMBOL_FOR_MODULES() I can change that.

It means cifs.ko and ksmbd.ko would need MODULE_IMPORT_NS("smbdirect"), correct?

Thanks!
metze

#3 lore raw
Quoted 10 lines · Stefan Metzmacher

Hi Christoph,

Quoted 7 lines
Quoted 7 lines
fs/smb/Makefile +0 -0
index 9a1bf59a1a65..353b1c2eefc4 100644
@@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
 
Quoted 6 lines
Quoted 4 lines

fs/smb/Makefile line 4

Quoted 2 lines
fs/smb/Makefile +1 -0
  obj-$(CONFIG_SMBFS)                += common/
+obj-$(CONFIG_SMBDIRECT)             += smbdirect/

Why is this not in net/smbdirect/ or driver/infiniband/ulp/smdirect?

Yes, I also thought about net/smbdirect.

I would prefer to leave it in fs/smb for the time being, since it makes it easier to track since fs/smb/server and fs/smb/client have dependencies
on it. In the long run, I don't mind moving it, if it starts being
used outside
of smb client and server.

Quoted 44 lines

As IPPROTO_SMBDIRECT or PF_SMBDIRECT will be the next step, see the open discussion here:
https://lore.kernel.org/linux-cifs/[email protected]/
(I'll follow with that discussion soon)

I was just unsure about the consequences, e.g. would the maintainer/pull request flow have to change in that case? Or would Steve be able to take the changes via his trees? Any I also didn't want to offend anybody, so I just took what Linus proposed.

Using driver/infiniband/ulp/smdirect would also work, if everybody prefer that.

Quoted 7 lines

As far as I can tell there is zero file system logic in this code.

fs/smb/Makefile line 5

Quoted 2 lines
fs/smb/Makefile +1 -1
-#include "../common/smbdirect/smbdirect_public.h"
+#include "../smbdirect/public.h"

And all these relative includes suggest you really want a include/linux/smdirect/ instead.

Yes, that's my also my goal in the next steps.

Quoted 2 lines

While we're at it: __SMBDIRECT_EXPORT_SYMBOL__ is really odd. One thing is the __ pre- and postfix that make it look weird.

Yes, the __SMBDIRECT_EXPORT_SYMBOL__ was mainly a temporary thing, now it's useless and I'll remove it.

Quoted 3 lines

The other is that EXPORT_SYMBOL_FOR_MODULES is for very specific symbols that really should not exported. What this warrants instead is a normal EXPORT_SYMBOL_NS_GPL.

I want the exported functions be minimal, as most of of should go via the socket layer instead.

If EXPORT_SYMBOL_NS_GPL(func, "smbdirect") is better than EXPORT_SYMBOL_FOR_MODULES() I can change that.

It means cifs.ko and ksmbd.ko would need MODULE_IMPORT_NS("smbdirect"), correct?

Thanks!
metze

Signature · 3 lines
Thanks,

Steve
maintainer
#4 lore raw
Quoted 16 lines · Steve French
Quoted 15 lines · Stefan Metzmacher

Hi Christoph,

Quoted 11 lines

fs/smb/Makefile line 4

Quoted 9 lines
fs/smb/Makefile +1 -0
index 9a1bf59a1a65..353b1c2eefc4 100644
@@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
 
  obj-$(CONFIG_SMBFS)                += common/
+obj-$(CONFIG_SMBDIRECT)             += smbdirect/

Why is this not in net/smbdirect/ or driver/infiniband/ulp/smdirect?

Quoted 7 lines
Quoted 1 line

Yes, I also thought about net/smbdirect.

I would prefer to leave it in fs/smb for the time being, since it makes it easier to track since fs/smb/server and fs/smb/client have dependencies
on it. In the long run, I don't mind moving it, if it starts being
used outside
of smb client and server.

Please let's not break backporting any further. Decide where it will end up at once. We don't want the "fs/cifs -> fs/smb/client" history all over again.

Won't samba be using it? If so, you could consider an user outside fs/smb/{client,server} and then leave it in net/ instead, as hch suggested.

#5 lore raw
In reply to Steve French
Quoted 11 lines · Steve French
Quoted 4 lines · Stefan Metzmacher
Quoted 2 lines

Why is this not in net/smbdirect/ or driver/infiniband/ulp/smdirect?

Yes, I also thought about net/smbdirect.

I would prefer to leave it in fs/smb for the time being, since it makes it easier to track since fs/smb/server and fs/smb/client have dependencies
on it. In the long run, I don't mind moving it, if it starts being
used outside of smb client and server.

I personally have no hugely strong opinions, but I think Christophs very question that gives two different alternative locations argues for just leaving it in fs/smb/

That driver/infiniband/ulp/smdirect location in particular is just a disgusting path.

It sure as hell is *not* a driver, it just uses the rdma infrastructure.

If rdma were to eventually itself split itself up into the driver code and non-driver code (like networking does), that might change things, but that's not happening now.

And as long as we expect smbdirect code to go through the smb maintainer, I'd rather have the location be about that clear situation rather than some arbitrary "it uses the rdma code" or "it's networking".

Because that code is not primarily about networking or about rdma. That code is primarily about smb.

So while I have no *strong* opinions and can deal with whatever maintainers find convenient, I think fs/smb/smbdirect is at least currently the sane location.

Linus

#6 lore raw
In reply to Stefan Metzmacher
Quoted 8 lines · Stefan Metzmacher
Quoted 1 line

Why is this not in net/smbdirect/ or driver/infiniband/ulp/smdirect?

Yes, I also thought about net/smbdirect.

As IPPROTO_SMBDIRECT or PF_SMBDIRECT will be the next step, see the open discussion here:
https://lore.kernel.org/linux-cifs/[email protected]/
(I'll follow with that discussion soon)

Seems like it is the right fit then.

Quoted 5 lines

I was just unsure about the consequences, e.g. would the maintainer/pull request flow have to change in that case? Or would Steve be able to take the changes via his trees? Any I also didn't want to offend anybody, so I just took what Linus proposed.

You might want to ask the sunrpc or ceph maintainers as they have a similar split.

maintainer Acked-by on v1 1/1
#7 lore raw
In reply to Stefan Metzmacher
Quoted 13 lines · Stefan Metzmacher

This also removes the smbdirect_ prefix from the files.

I also prefer to leave it in fs/smb, and I completely agree with Linus's opinion.

Thanks!