On Fri, Oct 23, 2009 at 1:13 AM, Vu Pham <[email protected]> wrote: > > [ ... ] > > Here is the updated patch which implement the device_loss_timeout for each > target instead of module parameter. It also reflects changes from previous > feedbacks. Please review > > > > Introducing device_loss_timeout per target granularity. Creating a timer to > clean up connection after device_loss_timeout expired. During > device_loss_timeout, the QP is in error state, srp will return DID_RESET > for outstanding I/Os and return FAILED for abort_cmd, reset_lun, and return > SUCCESS (without retrying reconnect) on reset_host > > Signed-off-by: Vu Pham <[email protected]> > > ----------------------------------------------------------------------- > > drivers/infiniband/ulp/srp/ib_srp.c | 94 ++++++++++++++++++++++++++++++++++- > drivers/infiniband/ulp/srp/ib_srp.h | 3 + > 2 files changed, 95 insertions(+), 2 deletions(-) > > diff --git a/drivers/infiniband/ulp/srp/ib_srp.c > b/drivers/infiniband/ulp/srp/ib_srp.c > index e44939a..12404d5 100644 > --- a/drivers/infiniband/ulp/srp/ib_srp.c > +++ b/drivers/infiniband/ulp/srp/ib_srp.c > @@ -433,6 +433,10 @@ static void srp_remove_work(struct work_struct *work) > return; > } > target->state = SRP_TARGET_REMOVED; > + > + if (timer_pending(&target->qp_err_timer)) > + del_timer_sync(&target->qp_err_timer); > + > spin_unlock_irq(target->scsi_host->host_lock); > > spin_lock(&target->srp_host->target_lock); > > [ ... ]
Calling del_timer_sync() while holding a spinlock can cause locking inversion. Has this code been tested on a kernel with LOCKDEP enabled ? Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
