]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: initialize client debugfs outside of monc->mutex
authorSage Weil <sage@newdream.net>
Sat, 14 Jan 2012 06:22:03 +0000 (22:22 -0800)
committerSage Weil <sage@newdream.net>
Thu, 2 Feb 2012 20:49:01 +0000 (12:49 -0800)
commite06505bc218e9f1d2cfc87f8d4719ad9e83e3219
tree2a680aca91c4906f28cda57093ac76b1e588de5d
parent046c426f419c4ef9da72ec4139a74143b93c92d1
ceph: initialize client debugfs outside of monc->mutex

Initializing debufs under monc->mutex introduces a lock dependency for
sb->s_type->i_mutex_key, which (combined with several other dependencies)
leads to an annoying lockdep warning.  There's no particular reason to do
the debugfs setup under this lock, so move it out.

It used to be the case that our first monmap could come from the OSD; that
is no longer the case with recent servers, so we will reliably set up the
client entry during the initial authentication.

We don't have to worry about racing with debugfs teardown by
ceph_debugfs_client_cleanup() because ceph_destroy_client() calls
ceph_msgr_flush() first, which will wait for the message dispatch work
to complete (and the debugfs init to complete).

Fixes: #1940
Signed-off-by: Sage Weil <sage@newdream.net>
net/ceph/ceph_common.c
net/ceph/mon_client.c