public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rogier Wolff <R.E.Wolff@BitWizard.nl>
To: linux-kernel@vger.kernel.org
Subject: nbd problem.
Date: Tue, 8 May 2007 21:40:54 +0200	[thread overview]
Message-ID: <20070508194053.GA23615@bitwizard.nl> (raw)


Hi,

The nbd client still reliably hangs when I use it. 

While looking into this, I found:


446                 req->errors = 0;
447                 spin_unlock_irq(q->queue_lock);
                   ^^^^^^^^^^^^^^^^^^^^
448 
449                 mutex_lock(&lo->tx_lock);
450                 if (unlikely(!lo->sock)) {
451                         mutex_unlock(&lo->tx_lock);
452                         printk(KERN_ERR "%s: Attempted send on closed socket\n",
453                                lo->disk->disk_name);
454                         req->errors++;
455                         nbd_end_request(req);
456                         spin_lock_irq(q->queue_lock);
457                         continue;
458                 }
459 
460                 lo->active_req = req;
461 
462                 if (nbd_send_req(lo, req) != 0) {
463                         printk(KERN_ERR "%s: Request send failed\n",
464                                         lo->disk->disk_name);
465                         req->errors++;
466                         nbd_end_request(req);
467                 } else {
468                         spin_lock(&lo->queue_lock);
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
469                         list_add(&req->queuelist, &lo->queue_head);
470                         spin_unlock(&lo->queue_lock);
471                 }
472 
473                 lo->active_req = NULL;


As far as I read things, the function is called with the lock
held and interrupts disabled., the lock can then be released and 
retaken without disabling interrupts again. 

Should this be fixed?

(it doesn't fix my hang though....)

	Roger. 

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement. 
Does it sit on the couch all day? Is it unemployed? Please be specific! 
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ

             reply	other threads:[~2007-05-08 19:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08 19:40 Rogier Wolff [this message]
2007-05-08 20:33 ` nbd problem Satyam Sharma
2007-05-09 11:10   ` Rogier Wolff
2007-05-09 12:38     ` Rogier Wolff
2007-05-09 12:52       ` Jan Engelhardt
2007-05-09 13:39     ` Jens Axboe
2007-05-09  5:48 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070508194053.GA23615@bitwizard.nl \
    --to=r.e.wolff@bitwizard.nl \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox