OCFS2-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Ocfs2-devel] [PATCH] Fix build failure of OCFS2 when TCP/IP is disabled
@ 2020-06-06 19:08 Tom Seewald
  2020-06-08  1:33 ` Joseph Qi
  2020-06-08  6:14 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Seewald @ 2020-06-06 19:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: tseewald, Christoph Hellwig, netdev, ocfs2-devel, Mark Fasheh,
	Joel Becker, Joseph Qi

After commit 12abc5ee7873 ("tcp: add tcp_sock_set_nodelay") and
commit c488aeadcbd0 ("tcp: add tcp_sock_set_user_timeout"), building the
kernel with OCFS2_FS=y but without INET=y causes it to fail with:

ld: fs/ocfs2/cluster/tcp.o: in function `o2net_accept_many':
tcp.c:(.text+0x21b1): undefined reference to `tcp_sock_set_nodelay'
ld: tcp.c:(.text+0x21c1): undefined reference to `tcp_sock_set_user_timeout
'
ld: fs/ocfs2/cluster/tcp.o: in function `o2net_start_connect':
tcp.c:(.text+0x2633): undefined reference to `tcp_sock_set_nodelay'
ld: tcp.c:(.text+0x2643): undefined reference to `tcp_sock_set_user_timeout
'

This is due to tcp_sock_set_nodelay() and tcp_sock_set_user_timeout() being
declared in linux/tcp.h and defined in net/ipv4/tcp.c, which depend on
TCP/IP being enabled.

To fix this, make OCFS2_FS depend on INET=y which already requires NET=y.

Signed-off-by: Tom Seewald <tseewald@gmail.com>
---
 fs/ocfs2/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/Kconfig b/fs/ocfs2/Kconfig
index 1177c33df895..aca16624b370 100644
--- a/fs/ocfs2/Kconfig
+++ b/fs/ocfs2/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config OCFS2_FS
 	tristate "OCFS2 file system support"
-	depends on NET && SYSFS && CONFIGFS_FS
+	depends on INET && SYSFS && CONFIGFS_FS
 	select JBD2
 	select CRC32
 	select QUOTA
-- 
2.20.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Ocfs2-devel] [PATCH] Fix build failure of OCFS2 when TCP/IP is disabled
  2020-06-06 19:08 [Ocfs2-devel] [PATCH] Fix build failure of OCFS2 when TCP/IP is disabled Tom Seewald
@ 2020-06-08  1:33 ` Joseph Qi
  2020-06-08  6:14 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph Qi @ 2020-06-08  1:33 UTC (permalink / raw)
  To: Tom Seewald, linux-kernel, Andrew Morton
  Cc: Christoph Hellwig, netdev, ocfs2-devel, Mark Fasheh, Joel Becker



On 2020/6/7 03:08, Tom Seewald wrote:
> After commit 12abc5ee7873 ("tcp: add tcp_sock_set_nodelay") and
> commit c488aeadcbd0 ("tcp: add tcp_sock_set_user_timeout"), building the
> kernel with OCFS2_FS=y but without INET=y causes it to fail with:
> 
> ld: fs/ocfs2/cluster/tcp.o: in function `o2net_accept_many':
> tcp.c:(.text+0x21b1): undefined reference to `tcp_sock_set_nodelay'
> ld: tcp.c:(.text+0x21c1): undefined reference to `tcp_sock_set_user_timeout
> '
> ld: fs/ocfs2/cluster/tcp.o: in function `o2net_start_connect':
> tcp.c:(.text+0x2633): undefined reference to `tcp_sock_set_nodelay'
> ld: tcp.c:(.text+0x2643): undefined reference to `tcp_sock_set_user_timeout
> '
> 
> This is due to tcp_sock_set_nodelay() and tcp_sock_set_user_timeout() being
> declared in linux/tcp.h and defined in net/ipv4/tcp.c, which depend on
> TCP/IP being enabled.
> 
> To fix this, make OCFS2_FS depend on INET=y which already requires NET=y.
> 
> Signed-off-by: Tom Seewald <tseewald@gmail.com>

Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
>  fs/ocfs2/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/Kconfig b/fs/ocfs2/Kconfig
> index 1177c33df895..aca16624b370 100644
> --- a/fs/ocfs2/Kconfig
> +++ b/fs/ocfs2/Kconfig
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config OCFS2_FS
>  	tristate "OCFS2 file system support"
> -	depends on NET && SYSFS && CONFIGFS_FS
> +	depends on INET && SYSFS && CONFIGFS_FS
>  	select JBD2
>  	select CRC32
>  	select QUOTA
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Ocfs2-devel] [PATCH] Fix build failure of OCFS2 when TCP/IP is disabled
  2020-06-06 19:08 [Ocfs2-devel] [PATCH] Fix build failure of OCFS2 when TCP/IP is disabled Tom Seewald
  2020-06-08  1:33 ` Joseph Qi
@ 2020-06-08  6:14 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2020-06-08  6:14 UTC (permalink / raw)
  To: Tom Seewald
  Cc: linux-kernel, Christoph Hellwig, netdev, ocfs2-devel,
	Mark Fasheh, Joel Becker, Joseph Qi

On Sat, Jun 06, 2020 at 02:08:26PM -0500, Tom Seewald wrote:
> After commit 12abc5ee7873 ("tcp: add tcp_sock_set_nodelay") and
> commit c488aeadcbd0 ("tcp: add tcp_sock_set_user_timeout"), building the
> kernel with OCFS2_FS=y but without INET=y causes it to fail with:
> 
> ld: fs/ocfs2/cluster/tcp.o: in function `o2net_accept_many':
> tcp.c:(.text+0x21b1): undefined reference to `tcp_sock_set_nodelay'
> ld: tcp.c:(.text+0x21c1): undefined reference to `tcp_sock_set_user_timeout
> '
> ld: fs/ocfs2/cluster/tcp.o: in function `o2net_start_connect':
> tcp.c:(.text+0x2633): undefined reference to `tcp_sock_set_nodelay'
> ld: tcp.c:(.text+0x2643): undefined reference to `tcp_sock_set_user_timeout
> '
> 
> This is due to tcp_sock_set_nodelay() and tcp_sock_set_user_timeout() being
> declared in linux/tcp.h and defined in net/ipv4/tcp.c, which depend on
> TCP/IP being enabled.
> 
> To fix this, make OCFS2_FS depend on INET=y which already requires NET=y.
> 
> Signed-off-by: Tom Seewald <tseewald@gmail.com>

Looks good, and this is the same that I did for nfsd:

Acked-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-06 19:08 [Ocfs2-devel] [PATCH] Fix build failure of OCFS2 when TCP/IP is disabled Tom Seewald
2020-06-08  1:33 ` Joseph Qi
2020-06-08  6:14 ` Christoph Hellwig

OCFS2-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/ocfs2-devel/0 ocfs2-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ocfs2-devel ocfs2-devel/ https://lore.kernel.org/ocfs2-devel \
		ocfs2-devel@oss.oracle.com
	public-inbox-index ocfs2-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.oracle.oss.ocfs2-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git