Whamcloud - gitweb
LU-15014 obdclass: lu_ref_add() called in atomic context 69/44969/4
authorJames Simmons <jsimmons@infradead.org>
Sun, 22 Aug 2021 22:40:49 +0000 (18:40 -0400)
committerOleg Drokin <green@whamcloud.com>
Sun, 10 Oct 2021 03:31:54 +0000 (03:31 +0000)
commit5a37bc9577d4c871cd468ca67b2c2d04aed9921f
tree2d23ec90e6c88da39c8b70f3662be961d60d092f
parent3c6a1e94c652685fac7c69bf530e05d27b7f477c
LU-15014 obdclass: lu_ref_add() called in atomic context

For the native Linux client testing I turn on lu_ref
debugging. When turned on the following errors occur:

[ 2885.946815] Call Trace:
[ 2885.951240]  dump_stack+0x68/0x9b
[ 2885.956523]  ___might_sleep+0x205/0x260
[ 2885.962245]  lu_ref_add+0x25/0x40 [obdclass]
[ 2885.968442]  vvp_pgcache_current+0x101/0x1a0 [lustre]
[ 2885.975370]  seq_read+0x1ab/0x3c0

and

[ 7042.102529]  dump_stack+0x68/0x9b
[ 7042.107328]  ___might_sleep+0x205/0x260
[ 7042.112647]  lu_ref_add+0x25/0x40 [obdclass]
[ 7042.118385]  mdc_lock_upcall+0x154/0x4d0 [mdc]
[ 7042.124275]  mdc_enqueue_send+0x508/0x580 [mdc]
[ 7042.130225]  ? mdc_lock_lvb_update+0x280/0x280 [mdc]

This is easily fixed with introducing a lu_object_ref_add_atomic()
function.

Test-Parameters: trivial
Change-Id: Ife7d255079a836570661f669c1e9c7c0ce6de4aa
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/44969
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lu_object.h
lustre/llite/vvp_dev.c
lustre/mdc/mdc_dev.c