Re: _nfs_display_fhandle_hash: undefined reference to `crc32_le'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oops!  The fix is ok, in that it will work, but I'm not sure we want to pull in that type of dependency for a debug message.

Maybe it'd be more appropriate to do something like this:

From 371ebd38717cd34a58d167909b56a216db288f83 Mon Sep 17 00:00:00 2001
From: Weston Andros Adamson <dros@xxxxxxxxxx>
Date: Mon, 19 Mar 2012 11:31:12 -0400
Subject: [PATCH] if CRC32 isn't defined just return 0 for fh hash


Signed-off-by: Weston Andros Adamson <dros@xxxxxxxxxx>
---
 fs/nfs/inode.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 1a19f8d..0c1ca6a 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1060,7 +1060,11 @@ u32 _nfs_display_fhandle_hash(const struct nfs_fh *fh)
 {
        /* wireshark uses 32-bit AUTODIN crc and does a bitwise
         * not on the result */
+#ifdef CONFIG_CRC32
        return ~crc32(0xFFFFFFFF, &fh->data[0], fh->size);
+#else
+       return 0;
+#endif
 }

 /*
-- 
1.7.4.4

Or (if possible) define the dependency iff NFS_FS and RPC_DEBUG are defined.

I'm sure Trond has an opinion on this.

-dros

On Mar 18, 2012, at 2:13 PM, Paul Gortmaker wrote:

> This started showing up in linux-next last week:
> 
>  LD      .tmp_vmlinux1
> fs/built-in.o: In function `_nfs_display_fhandle_hash':
> /scratch/kisskb/src/fs/nfs/inode.c:1063: undefined reference to `crc32_le'
> make[1]: *** [.tmp_vmlinux1] Error 1
> 
> Target is an mpc8xx board:
> 
> http://kisskb.ellerman.id.au/kisskb/target/2679/
> 
> I tried to run an automated bisect on it, but there appears to
> be build failures in the bisection range, in addition to the
> above link error (i.e. points I'd use "skip" on if I wasn't
> using "git bisect run ...")
> 
> # good: [b030fb0bb113316cc6f56779388b8572ab0699da] SUNRPC: use proper network namespace in rpcbind RPCBPROC_GETADDR procedure
> git bisect good b030fb0bb113316cc6f56779388b8572ab0699da
> # bad: [5247fab5c82779174d50590e0200bf532248a8a1] SUNRPC: pass network namespace to service registering routines
> git bisect bad 5247fab5c82779174d50590e0200bf532248a8a1
> 
> Even without the concrete trigger commit, a suggested possible
> fix (tested locally) is below.
> 
> Paul.
> ---
> 
> From 21b77ae0373725bd2c60eca065e77c4d2f0fdbfa Mon Sep 17 00:00:00 2001
> From: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
> Date: Sun, 18 Mar 2012 14:07:42 -0400
> Subject: [PATCH] nfs: select CRC32 for when NFS is enabled for crc32_le
> 
> To avoid the following link errors:
> 
>  LD      .tmp_vmlinux1
> fs/built-in.o: In function `_nfs_display_fhandle_hash':
> fs/nfs/inode.c:1063: undefined reference to `crc32_le'
> make[1]: *** [.tmp_vmlinux1] Error 1
> 
> Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
> 
> diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
> index 7bce64c..9acdfb0 100644
> --- a/fs/nfs/Kconfig
> +++ b/fs/nfs/Kconfig
> @@ -3,6 +3,7 @@ config NFS_FS
> 	depends on INET && FILE_LOCKING
> 	select LOCKD
> 	select SUNRPC
> +	select CRC32
> 	select NFS_ACL_SUPPORT if NFS_V3_ACL
> 	help
> 	  Choose Y here if you want to access files residing on other
> -- 
> 1.7.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux