[ It's complaining because of 0500813fe0c9a ('drbd: Move conf_mutex from connection to resource') because &connection->resource->req_lock and &device->resource->req_lock aren't used consistently. It's old code but still confusing so I'll pass the warning along. -dan ]
tree: git://git.drbd.org/linux-drbd.git for-3.17 head: 3f500c97166a2cdd7c15743c77c5ba3c766904de commit: 0b95c7a2e8a23c00dc17a690f4c57feef0aca549 [44/61] drbd: add caching oldest request pointers for replication stages drivers/block/drbd/drbd_req.c:1611 request_timer_fn() warn: inconsistent returns spin_lock:&connection->resource->req_lock: locked (1544) unlocked (1611) drivers/block/drbd/drbd_req.c:1611 request_timer_fn() warn: inconsistent returns spin_lock:&device->resource->req_lock: locked (1611) unlocked (1544) git remote add drdb git://git.drbd.org/linux-drbd.git git remote update drdb git checkout 0b95c7a2e8a23c00dc17a690f4c57feef0aca549 vim +1611 drivers/block/drbd/drbd_req.c dfa8bedb Philipp Reisner 2011-06-29 1538 } 44ed167d Philipp Reisner 2011-04-19 1539 rcu_read_unlock(); 7fde2be9 Philipp Reisner 2011-03-01 1540 dfa8bedb Philipp Reisner 2011-06-29 1541 et = min_not_zero(dt, ent); dfa8bedb Philipp Reisner 2011-06-29 1542 ba280c09 Lars Ellenberg 2012-04-25 1543 if (!et) 7fde2be9 Philipp Reisner 2011-03-01 @1544 return; /* Recurring timer stopped */ 7fde2be9 Philipp Reisner 2011-03-01 1545 ba280c09 Lars Ellenberg 2012-04-25 1546 now = jiffies; 0b95c7a2 Lars Ellenberg 2013-11-22 1547 nt = now + et; ba280c09 Lars Ellenberg 2012-04-25 1548 0500813f Andreas Gruenbacher 2011-07-07 1549 spin_lock_irq(&device->resource->req_lock); 0b95c7a2 Lars Ellenberg 2013-11-22 1550 req_read = list_first_entry_or_null(&device->pending_completion[0], struct drbd_request, req_pending_local); 0b95c7a2 Lars Ellenberg 2013-11-22 1551 req_write = list_first_entry_or_null(&device->pending_completion[1], struct drbd_request, req_pending_local); 0b95c7a2 Lars Ellenberg 2013-11-22 1552 req_peer = connection->req_not_net_done; 0b95c7a2 Lars Ellenberg 2013-11-22 1553 /* maybe the oldest request waiting for the peer is in fact still 0b95c7a2 Lars Ellenberg 2013-11-22 1554 * blocking in tcp sendmsg */ 0b95c7a2 Lars Ellenberg 2013-11-22 1555 if (!req_peer && connection->req_next && connection->req_next->pre_send_jif) 0b95c7a2 Lars Ellenberg 2013-11-22 1556 req_peer = connection->req_next; 0b95c7a2 Lars Ellenberg 2013-11-22 1557 0b95c7a2 Lars Ellenberg 2013-11-22 1558 /* evaluate the oldest peer request only in one timer! */ 0b95c7a2 Lars Ellenberg 2013-11-22 1559 if (req_peer && req_peer->device != device) 0b95c7a2 Lars Ellenberg 2013-11-22 1560 req_peer = NULL; 0b95c7a2 Lars Ellenberg 2013-11-22 1561 0b95c7a2 Lars Ellenberg 2013-11-22 1562 /* do we have something to evaluate? */ 0b95c7a2 Lars Ellenberg 2013-11-22 1563 if (req_peer == NULL && req_write == NULL && req_read == NULL) 0b95c7a2 Lars Ellenberg 2013-11-22 1564 goto out; 0b95c7a2 Lars Ellenberg 2013-11-22 1565 0b95c7a2 Lars Ellenberg 2013-11-22 1566 oldest_submit_jif = 0b95c7a2 Lars Ellenberg 2013-11-22 1567 (req_write && req_read) 0b95c7a2 Lars Ellenberg 2013-11-22 1568 ? ( time_before(req_write->pre_submit_jif, req_read->pre_submit_jif) 0b95c7a2 Lars Ellenberg 2013-11-22 1569 ? req_write->pre_submit_jif : req_read->pre_submit_jif ) 0b95c7a2 Lars Ellenberg 2013-11-22 1570 : req_write ? req_write->pre_submit_jif 0b95c7a2 Lars Ellenberg 2013-11-22 1571 : req_read ? req_read->pre_submit_jif : now; 7fde2be9 Philipp Reisner 2011-03-01 1572 ba280c09 Lars Ellenberg 2012-04-25 1573 /* The request is considered timed out, if ba280c09 Lars Ellenberg 2012-04-25 1574 * - we have some effective timeout from the configuration, ba280c09 Lars Ellenberg 2012-04-25 1575 * with above state restrictions applied, ba280c09 Lars Ellenberg 2012-04-25 1576 * - the oldest request is waiting for a response from the network ba280c09 Lars Ellenberg 2012-04-25 1577 * resp. the local disk, ba280c09 Lars Ellenberg 2012-04-25 1578 * - the oldest request is in fact older than the effective timeout, ba280c09 Lars Ellenberg 2012-04-25 1579 * - the connection was established (resp. disk was attached) ba280c09 Lars Ellenberg 2012-04-25 1580 * for longer than the timeout already. ba280c09 Lars Ellenberg 2012-04-25 1581 * Note that for 32bit jiffies and very stable connections/disks, ba280c09 Lars Ellenberg 2012-04-25 1582 * we may have a wrap around, which is catched by ba280c09 Lars Ellenberg 2012-04-25 1583 * !time_in_range(now, last_..._jif, last_..._jif + timeout). ba280c09 Lars Ellenberg 2012-04-25 1584 * ba280c09 Lars Ellenberg 2012-04-25 1585 * Side effect: once per 32bit wrap-around interval, which means every ba280c09 Lars Ellenberg 2012-04-25 1586 * ~198 days with 250 HZ, we have a window where the timeout would need ba280c09 Lars Ellenberg 2012-04-25 1587 * to expire twice (worst case) to become effective. Good enough. ba280c09 Lars Ellenberg 2012-04-25 1588 */ 08535466 Lars Ellenberg 2014-04-28 1589 if (ent && req_peer && 0b95c7a2 Lars Ellenberg 2013-11-22 1590 time_after(now, req_peer->pre_send_jif + ent) && bde89a9e Andreas Gruenbacher 2011-05-30 1591 !time_in_range(now, connection->last_reconnect_jif, connection->last_reconnect_jif + ent)) { d0180171 Andreas Gruenbacher 2011-07-03 1592 drbd_warn(device, "Remote failed to finish a request within ko-count * timeout\n"); b30ab791 Andreas Gruenbacher 2011-07-03 1593 _drbd_set_state(_NS(device, conn, C_TIMEOUT), CS_VERBOSE | CS_HARD, NULL); 7fde2be9 Philipp Reisner 2011-03-01 1594 } 0b95c7a2 Lars Ellenberg 2013-11-22 1595 if (dt && oldest_submit_jif != now && 0b95c7a2 Lars Ellenberg 2013-11-22 1596 time_after(now, oldest_submit_jif + dt) && b30ab791 Andreas Gruenbacher 2011-07-03 1597 !time_in_range(now, device->last_reattach_jif, device->last_reattach_jif + dt)) { d0180171 Andreas Gruenbacher 2011-07-03 1598 drbd_warn(device, "Local backing device failed to meet the disk-timeout\n"); b30ab791 Andreas Gruenbacher 2011-07-03 1599 __drbd_chk_io_error(device, DRBD_FORCE_DETACH); dfa8bedb Philipp Reisner 2011-06-29 1600 } 08535466 Lars Ellenberg 2014-04-28 1601 08535466 Lars Ellenberg 2014-04-28 1602 /* Reschedule timer for the nearest not already expired timeout. 08535466 Lars Ellenberg 2014-04-28 1603 * Fallback to now + min(effective network timeout, disk timeout). */ 0b95c7a2 Lars Ellenberg 2013-11-22 1604 ent = (ent && req_peer && time_before(now, req_peer->pre_send_jif + ent)) 0b95c7a2 Lars Ellenberg 2013-11-22 1605 ? req_peer->pre_send_jif + ent : now + et; 0b95c7a2 Lars Ellenberg 2013-11-22 1606 dt = (dt && oldest_submit_jif != now && time_before(now, oldest_submit_jif + dt)) 0b95c7a2 Lars Ellenberg 2013-11-22 1607 ? oldest_submit_jif + dt : now + et; 08535466 Lars Ellenberg 2014-04-28 1608 nt = time_before(ent, dt) ? ent : dt; 0b95c7a2 Lars Ellenberg 2013-11-22 1609 out: 0500813f Andreas Gruenbacher 2011-07-07 1610 spin_unlock_irq(&connection->resource->req_lock); b30ab791 Andreas Gruenbacher 2011-07-03 @1611 mod_timer(&device->request_timer, nt); 7fde2be9 Philipp Reisner 2011-03-01 1612 } --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation _______________________________________________ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild