Skip to contentSkip to conversation

nfs commit breaks build for nfs4.1=y nfs4.2=n

DISCUSSION Paul Gortmaker 3 participants 6 messages Jun 25, 2015 – Jun 26, 2015 Linux-next tree

lore
Share & tools
lore
#0 lore raw

New breakage seen in linux-next:

fs/nfs/pnfs.c:2293: undefined reference to
`nfs42_proc_layoutstats_generic'

...bisected to:

commit 8733408d6ed713d080c325262d7b51a780136d41

Author: Peng Tao <[email protected]>
Date:   Tue Jun 23 19:51:57 2015 +0800

pnfs: add pnfs_report_layoutstat helper function

Probably caused by the unusual defconfig having:

$ grep NFS .config
CONFIG_KERNFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
# CONFIG_NFS_SWAP is not set
CONFIG_NFS_V4_1=y			<------------
# CONFIG_NFS_V4_2 is not set		<------------
CONFIG_PNFS_FILE_LAYOUT=y
CONFIG_PNFS_FLEXFILE_LAYOUT=m
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
# CONFIG_NFS_V4_1_MIGRATION is not set
CONFIG_ROOT_NFS=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
# CONFIG_NFSD is not set
CONFIG_NFS_COMMON=y

http://kisskb.ellerman.id.au/kisskb/buildresult/12449989/

#1 lore raw

[next] nfs update breaks build on sparc

New breakage seen in linux-next today:

ERROR: "__xchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined!
ERROR: "__cmpxchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined! make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2

I tried to reproduce it locally so I could run a bisect, but it must be toolchain specific because I don't see it.

Paul.

#2 lore raw

Re: [next] nfs update breaks build on sparc

Quoted 10 lines · Paul Gortmaker

New breakage seen in linux-next today:

ERROR: "__xchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined!
ERROR: "__cmpxchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined! make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2

I tried to reproduce it locally so I could run a bisect, but it must be toolchain specific because I don't see it.

Presumably this is the same thing; showing up in i386 and elsewhere:

fs/nfs/flexfilelayout/flexfilelayout.c:444:15: error: call to '__xchg_wrong_size' declared with attribute error: Bad argument size for xchg
fs/nfs/flexfilelayout/flexfilelayout.c:433:3: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg fs/nfs/flexfilelayout/flexfilelayout.c:463:2: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg fs/nfs/flexfilelayout/flexfilelayout.c:464:2: error: call to '__cmpxchg_wrong_size' declared with attribute error: Bad argument size for cmpxchg
make[4]: *** [fs/nfs/flexfilelayout/flexfilelayout.o] Error 1 make[3]: *** [fs/nfs/flexfilelayout] Error 2
make[2]: *** [fs/nfs] Error 2

http://kisskb.ellerman.id.au/kisskb/buildresult/12449737/

Paul.
---

#3 lore raw

Re: [next] nfs update breaks build on sparc

In reply to Paul Gortmaker
Quoted 11 lines · Paul Gortmaker

New breakage seen in linux-next today:

ERROR: "__xchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined!
ERROR: "__cmpxchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined! make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2

I tried to reproduce it locally so I could run a bisect, but it must be toolchain specific because I don't see it.

Sigh. It looks as if xchg() and cmpxchg() are not available for 64-bit integers on sparc32.
Tao, can we rely on mirror->lock to provide atomicity here instead?

Cheers
Trond

#4 lore raw

Re: [next] nfs update breaks build on sparc

Quoted 10 lines · Trond Myklebust
Quoted 8 lines · Paul Gortmaker

New breakage seen in linux-next today:

ERROR: "__xchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined!
ERROR: "__cmpxchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined! make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2

Quoted 8 lines
Quoted 3 lines

I tried to reproduce it locally so I could run a bisect, but it must be toolchain specific because I don't see it.

Sigh. It looks as if xchg() and cmpxchg() are not available for 64-bit integers on sparc32.
Tao, can we rely on mirror->lock to provide atomicity here instead?

yes, we can. It is already under mirror->lock. So we just need to open code xchg/cmpxchg(). I'll send a patch to fix it.

Cheers,
Tao

#5 lore raw
In reply to Paul Gortmaker

Thanks Paul! It was reported by kbuild test robot and a fix has been sent to linux-nfs list.

Cheers,
Tao

Quoted 41 lines · Paul Gortmaker

New breakage seen in linux-next:

fs/nfs/pnfs.c:2293: undefined reference to
`nfs42_proc_layoutstats_generic'

...bisected to:

commit 8733408d6ed713d080c325262d7b51a780136d41

Author: Peng Tao <[email protected]>
Date:   Tue Jun 23 19:51:57 2015 +0800

pnfs: add pnfs_report_layoutstat helper function

Probably caused by the unusual defconfig having:

$ grep NFS .config
CONFIG_KERNFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
# CONFIG_NFS_SWAP is not set
CONFIG_NFS_V4_1=y                       <------------
# CONFIG_NFS_V4_2 is not set            <------------
CONFIG_PNFS_FILE_LAYOUT=y
CONFIG_PNFS_FLEXFILE_LAYOUT=m
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
# CONFIG_NFS_V4_1_MIGRATION is not set
CONFIG_ROOT_NFS=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
# CONFIG_NFSD is not set
CONFIG_NFS_COMMON=y

http://kisskb.ellerman.id.au/kisskb/buildresult/12449989/