Feature #1922
rbd: annotate for lockdep
% Done:
0%
Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Description
This happened when lockdep was turned on:
2012-01-10T12:56:12.785388-08:00 sepia54 kernel: [ 3536.845746] rbd: loaded rbd (rados block device) 2012-01-10T12:56:13.035381-08:00 sepia54 kernel: [ 3537.098259] libceph: client0 fsid 9466bc62-f527-4ee6-b3f4-f7c75aa6e6eb 2012-01-10T12:56:13.035408-08:00 sepia54 kernel: [ 3537.099716] libceph: mon2 10.3.14.183:6789 session established 2012-01-10T12:56:13.035520-08:00 sepia54 kernel: [ 3537.099884] INFO: trying to register non-static key. 2012-01-10T12:56:13.201443-08:00 sepia54 kernel: [ 3537.104915] the code is fine but needs lockdep annotation. 2012-01-10T12:56:13.201455-08:00 sepia54 kernel: [ 3537.109706] turning off the locking correctness validator. 2012-01-10T12:56:13.201564-08:00 sepia54 kernel: [ 3537.109706] Pid: 23848, comm: rbd Not tainted 3.2.0-ceph-00011-g35a3324 #1 2012-01-10T12:56:13.201623-08:00 sepia54 kernel: [ 3537.109706] Call Trace: 2012-01-10T12:56:13.201680-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff8109cebf>] register_lock_class+0x24f/0x4b0 2012-01-10T12:56:13.201789-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff8109f5b9>] __lock_acquire+0x99/0x15d0 2012-01-10T12:56:13.201797-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff81123b28>] ? __alloc_pages_nodemask+0x128/0x7d0 2012-01-10T12:56:13.201806-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff8109e94f>] ? check_irq_usage+0x9f/0xf0 2012-01-10T12:56:13.201812-08:00 sepia54 kernel: [ 3537.109706] [<ffffffffa00d3bb6>] ? rbd_do_request+0xa6/0x3b0 [rbd] 2012-01-10T12:56:13.201816-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff810a10e2>] lock_acquire+0xa2/0x120 2012-01-10T12:56:13.201821-08:00 sepia54 kernel: [ 3537.109706] [<ffffffffa00d3bb6>] ? rbd_do_request+0xa6/0x3b0 [rbd] 2012-01-10T12:56:13.201826-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff8109ffac>] ? __lock_acquire+0xa8c/0x15d0 2012-01-10T12:56:13.201835-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff816048e9>] down_read+0x39/0x50 2012-01-10T12:56:13.201840-08:00 sepia54 kernel: [ 3537.109706] [<ffffffffa00d3bb6>] ? rbd_do_request+0xa6/0x3b0 [rbd] 2012-01-10T12:56:13.201846-08:00 sepia54 kernel: [ 3537.109706] [<ffffffffa00d3bb6>] rbd_do_request+0xa6/0x3b0 [rbd] 2012-01-10T12:56:13.201851-08:00 sepia54 kernel: [ 3537.109706] [<ffffffffa00d4021>] T.953+0xe1/0x1b0 [rbd] 2012-01-10T12:56:13.201860-08:00 sepia54 kernel: [ 3537.109706] [<ffffffffa00d418c>] rbd_read_header+0x9c/0x330 [rbd] 2012-01-10T12:56:13.201869-08:00 sepia54 kernel: [ 3537.109706] [<ffffffffa00d5e0b>] rbd_add+0x58b/0xd88 [rbd] 2012-01-10T12:56:13.201874-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff811eb5fd>] ? sysfs_write_file+0xcd/0x170 2012-01-10T12:56:13.201879-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff813e0487>] bus_attr_store+0x27/0x30 2012-01-10T12:56:13.201888-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff811eb616>] sysfs_write_file+0xe6/0x170 2012-01-10T12:56:13.201903-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff811763f8>] vfs_write+0xc8/0x190 2012-01-10T12:56:13.201909-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff811765b1>] sys_write+0x51/0x90 2012-01-10T12:56:13.201914-08:00 sepia54 kernel: [ 3537.109706] [<ffffffff8160e1c2>] system_call_fastpath+0x16/0x1b
History
#1 Updated by Alex Elder almost 12 years ago
- Assignee set to Alex Elder
I believe the problem is that when a new rbd device structure gets
initialized in rbd_add(), the rw_semaphore contained within the
header sub-structure is not getting properly initialized. I have
a simple fix I'm testing that initializes it.
#2 Updated by Alex Elder almost 12 years ago
- Status changed from New to Resolved
The fix was to initialize the semaphore in rbd_add().
I have verified that this eliminates the lockdep warning.
Sage will be committing this and sending it to Linus today.