Re: [RFC PATCH] btrfs: Hook btrfs' DRW lock to locktorture infrastructure

From: David Sterba
Date: Mon Aug 05 2019 - 14:16:43 EST


On Mon, Aug 05, 2019 at 09:36:21AM -0700, Nathan Chancellor wrote:
> Looks like this is in next-20190805 and causes a link time error when
> CONFIG_BTRFS_FS is unset:
>
> LD vmlinux.o
> MODPOST vmlinux.o
> MODINFO modules.builtin.modinfo
> ld.lld: error: undefined symbol: btrfs_drw_lock_init
> >>> referenced by locktorture.c
> >>> locking/locktorture.o:(torture_drw_init) in archive kernel/built-in.a
>
> ld.lld: error: undefined symbol: btrfs_drw_write_lock
> >>> referenced by locktorture.c
> >>> locking/locktorture.o:(torture_drw_write_lock) in archive kernel/built-in.a
>
> ld.lld: error: undefined symbol: btrfs_drw_write_unlock
> >>> referenced by locktorture.c
> >>> locking/locktorture.o:(torture_drw_write_unlock) in archive kernel/built-in.a
>
> ld.lld: error: undefined symbol: btrfs_drw_read_lock
> >>> referenced by locktorture.c
> >>> locking/locktorture.o:(torture_drw_read_lock) in archive kernel/built-in.a
>
> ld.lld: error: undefined symbol: btrfs_drw_read_unlock
> >>> referenced by locktorture.c
> >>> locking/locktorture.o:(torture_drw_read_unlock) in archive kernel/built-in.a
>
> If this commit is to remain around, there should probably be static
> inline stubs in fs/btrfs/locking.h. Apologies if this has already been
> reported, I still see the commit in the btrfs for-next branch.

Sorry for the build breakage, the patch is not essential for the
patchset so I'll remove it from the upcoming for-next branch.