On Wed, May 22, 2013 at 02:43:43PM +0200, Martin Peschke wrote: > > > -------- Original Message -------- > > Subject: Re: [PATCH] zfcp: Fix spinlock imbalance in zfcp_qdio_sbal_get > > Date: Wed, 15 May 2013 18:03:56 +0200 > > From: Heiko Carstens <heiko.carstens@xxxxxxxxxx> > > To: Mikulas Patocka <mpatocka@xxxxxxxxxx> > > CC: Steffen Maier <maier@xxxxxxxxxxxxxxxxxx>, linux390@xxxxxxxxxx, > > linux-s390@xxxxxxxxxxxxxxx > > > > On Wed, May 15, 2013 at 10:58:59AM -0400, Mikulas Patocka wrote: > > > zfcp: Fix spinlock imbalance in zfcp_qdio_sbal_get > > > > > > Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx> > > > > > > --- > > > drivers/s390/scsi/zfcp_qdio.c | 5 ++++- > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > Index: linux-2.6/drivers/s390/scsi/zfcp_qdio.c > > > =================================================================== > > > --- linux-2.6.orig/drivers/s390/scsi/zfcp_qdio.c 2013-05-15 16:53:14.000000000 +0200 > > > +++ linux-2.6/drivers/s390/scsi/zfcp_qdio.c 2013-05-15 16:54:23.000000000 +0200 > > > @@ -250,8 +250,11 @@ int zfcp_qdio_sbal_get(struct zfcp_qdio > > > ret = wait_event_interruptible_timeout(qdio->req_q_wq, > > > zfcp_qdio_sbal_check(qdio), 5 * HZ); > > > > > > - if (!(atomic_read(&qdio->adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP)) > > > + if (!(atomic_read(&qdio->adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP)) { > > > + if (ret <= 0) > > > + spin_lock_irq(&qdio->req_q_lock); > > > return -EIO; > > > + } > > > > Looks good to me. However it's Steffen's call. > > Looking at the commit that introduced this race: > > commit c2af7545aaff3495d9bf9a7608c52f0af86fb194 > Author: Christof Schmitt <christof.schmitt@xxxxxxxxxx> > Date: Mon Jun 21 10:11:32 2010 +0200 > > [SCSI] zfcp: Do not wait for SBALs on stopped queue > > Trying to read the FC host statistics on an offline adapter results in > a 5 seconds wait. Reading the statistics tries to issue an exchange > port data request which first waits up to 5 seconds for an entry in > the request queue. > > Change the strategy for getting a free SBAL to exit when the queue is > stopped. Reading the statistics will then fail without the wait. > > makes me think that it would be best to revert it. Fine with me. So we can eiter take Mikulas' patch which is ready or your approach. However it would be good to have this fixed within 3.10 since there is a working fix aroung. Hm? -- To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html