aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/mgc
diff options
context:
space:
mode:
authorAndreas Dilger <andreas.dilger@intel.com>2016-06-20 16:55:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-20 14:28:39 -0700
commit9936913e549bca6721157418bb5014118c3786e0 (patch)
treeb29ba5f83cc49189b7b1fa128dad3c90ff606f54 /drivers/staging/lustre/lustre/mgc
parentstaging/lustre/libcfs: Do not call kthread_run in wrong state (diff)
downloadlinux-dev-9936913e549bca6721157418bb5014118c3786e0.tar.xz
linux-dev-9936913e549bca6721157418bb5014118c3786e0.zip
staging: lustre: quiet lockdep recursive lock warning
Lockdep complains about potential recursive locking during mount because the client configuration log is holding a lock on the MGC obd_device to prevent it from being torn down, while also getting mutexes on the MDC and OSC devices as they are instantiated: Lustre: Mounted myth-client ============================================= [ INFO: possible recursive locking detected ] 4.7.0-rc2-vm-nfs+ #127 Tainted: G C --------------------------------------------- May be due to missing lock nesting notation 2 locks held by ll_cfg_requeue/5928: #0: (&cli->cl_sem){.+.+.+}, at: mgc_requeue_thread+0x15d/0x730 [mgc] #1: (&cld->cld_lock){+.+.+.}, at: mgc_process_log+0x5e/0xf80 [mgc] CPU: 0 PID: 5928 Comm: ll_cfg_requeue Call Trace: [<ffffffff814a0855>] dump_stack+0x86/0xc1 [<ffffffff810e7766>] __lock_acquire+0x726/0x1210 [<ffffffff810e86be>] lock_acquire+0xfe/0x1f0 [<ffffffff81888171>] down_read+0x51/0xa0 [<ffffffffa04a8477>] sptlrpc_conf_client_adapt+0x47/0x150 [ptlrpc] [<ffffffffa0186b16>] mdc_set_info_async+0x2b6/0x470 [mdc] [<ffffffffa0294090>] class_notify_sptlrpc_conf+0x190/0x360 [obdclass] [<ffffffffa01a9e85>] mgc_process_log+0x925/0xf80 [mgc] [<ffffffffa01abafa>] mgc_requeue_thread+0x1fa/0x730 [mgc] [<ffffffff810af331>] kthread+0x101/0x120 [<ffffffff8188ad6f>] ret_from_fork+0x1f/0x40 Add a separate lock class for the MGC callpath, since it will always be held first, and none of the other obd_device locks should ever be held concurrently. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/mgc')
-rw-r--r--drivers/staging/lustre/lustre/mgc/mgc_request.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index fbbf2762ac84..9d0bd4745865 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -496,7 +496,9 @@ static void do_requeue(struct config_llog_data *cld)
* export which is being disconnected. Take the client
* semaphore to make the check non-racy.
*/
- down_read(&cld->cld_mgcexp->exp_obd->u.cli.cl_sem);
+ down_read_nested(&cld->cld_mgcexp->exp_obd->u.cli.cl_sem,
+ OBD_CLI_SEM_MGC);
+
if (cld->cld_mgcexp->exp_obd->u.cli.cl_conn_count != 0) {
int rc;