summaryrefslogtreecommitdiffstats
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-05-29 11:19:00 -0500
committerSage Weil <sage@inktank.com>2013-07-03 15:32:39 -0700
commit08f75463c15e26e9d67a7c992ce7dd8964c6cbdd (patch)
treeb1ec2df4acc47286381aa0085eeb5c76f03e628d /net/ceph/osd_client.c
parent3b5cf2a2f1746a253d56f54ffbb45170c90b1cbd (diff)
downloadlinux-08f75463c15e26e9d67a7c992ce7dd8964c6cbdd.tar.bz2
rbd: protect against duplicate client creation
If more than one rbd image has the same ceph cluster configuration (same options, same set of monitors, same keys) they normally share a single rbd client. When an image is getting mapped, rbd looks to see if an existing client can be used, and creates a new one if not. The lookup and creation are not done under a common lock though, so mapping two images concurrently could lead to duplicate clients getting set up needlessly. This isn't a major problem, but it's wasteful and different from what's intended. This patch fixes that by using the control mutex to protect both the lookup and (if needed) creation of the client. It was previously used just when creating. This resolves: http://tracker.ceph.com/issues/3094 Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net/ceph/osd_client.c')
0 files changed, 0 insertions, 0 deletions