public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "vijay srinath" <vijaysrinath@lycos.com>
To: linux-kernel@vger.kernel.org
Cc: vikram_kmurthy@yahoo.com
Subject: SCSI Tape driver problem
Date: Tue, 31 Jul 2001 10:10:10 +0530	[thread overview]
Message-ID: <MEAIEKBGIFKBAAAA@mailcity.com> (raw)

hello all,

    I noticed a bug in the scsi tape class driver in kernel 2.2.16/2.4.x.
This is the test that i ran. 
1. I have two scsi-fc tape devices
2. I insert the hba driver, so that both the tape devices are enabled and map to st0 and st1
3. I remove the device that maps to st0 using 
   echo "scsi remove-single-device 0 0 0 0" > /proc/scsi/scsi
4. Now, if i try to do an open("/dev/st1",..), the process hangs as the open call never returns.

    The problem seems to be in the callback function st_sleep_done() where the following comparison is being made
if ((st_nbr = TAPE_NR(SCpnt->request.rq_dev)) < st_template.nr_dev) 
{
 ...
}

This comparision fails for the above test since nr_dev will be 1 and 
TAPE_NR() will also be 1 for /dev/st1. Hence the semaphore 
SCpnt->request.sem never gets released and open waits forever.


    Can somebody please let me know why this comparison is needed ?

regards
vijay



Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

             reply	other threads:[~2001-07-31  4:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-31  4:40 vijay srinath [this message]
2001-07-31 19:33 ` SCSI Tape driver problem Kai Makisara

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=MEAIEKBGIFKBAAAA@mailcity.com \
    --to=vijaysrinath@lycos.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vikram_kmurthy@yahoo.com \
    /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