* 2.5.44-ac4 scsi CDROMEJECT problem @ 2002-10-27 22:31 Nyk Tarr 2002-10-28 8:15 ` Jens Axboe 0 siblings, 1 reply; 5+ messages in thread From: Nyk Tarr @ 2002-10-27 22:31 UTC (permalink / raw) To: linux-kernel Hi This patch of Jens Axboe was missing from 2.5.44-ac4. Was this by design or accidental? > Irk you are on SCSI, yes you need this incremental patch for that to > work. Sorry about that, I've put up 16b which contains this. --- drivers/block/scsi_ioctl.c~ 2002-10-25 16:46:58.000000000 +0200 +++ drivers/block/scsi_ioctl.c 2002-10-25 16:47:32.000000000 +0200 @@ -319,6 +319,8 @@ case CDROMEJECT: rq = blk_get_request(q, WRITE, __GFP_WAIT); rq->flags = REQ_BLOCK_PC; + rq->rq_dev = to_kdev_t(bdev->bd_dev); + rq->rq_disk = bdev->bd_disk; rq->data = NULL; rq->data_len = 0; rq->timeout = BLK_DEFAULT_TIMEOUT; > -- > Jens Axboe -- /__ \_|\/ /\ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.5.44-ac4 scsi CDROMEJECT problem 2002-10-27 22:31 2.5.44-ac4 scsi CDROMEJECT problem Nyk Tarr @ 2002-10-28 8:15 ` Jens Axboe 2002-10-28 10:54 ` Nyk Tarr 0 siblings, 1 reply; 5+ messages in thread From: Jens Axboe @ 2002-10-28 8:15 UTC (permalink / raw) To: Nyk Tarr; +Cc: linux-kernel On Sun, Oct 27 2002, Nyk Tarr wrote: > Hi > > This patch of Jens Axboe was missing from 2.5.44-ac4. Was this by design > or accidental? Please check blk_do_rq(), it sets rq_dev and rq_disk. So it's indeed intentional. Since you ask, do you have problems ejecting? -- Jens Axboe ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.5.44-ac4 scsi CDROMEJECT problem 2002-10-28 8:15 ` Jens Axboe @ 2002-10-28 10:54 ` Nyk Tarr 2002-10-28 10:57 ` Jens Axboe 0 siblings, 1 reply; 5+ messages in thread From: Nyk Tarr @ 2002-10-28 10:54 UTC (permalink / raw) To: Jens Axboe; +Cc: linux-kernel On Mon, Oct 28, 2002 at 09:15:07AM +0100, Jens Axboe wrote: > On Sun, Oct 27 2002, Nyk Tarr wrote: > > Hi > > > > This patch of Jens Axboe was missing from 2.5.44-ac4. Was this by design > > or accidental? > > Please check blk_do_rq(), it sets rq_dev and rq_disk. So it's indeed > intentional. Since you ask, do you have problems ejecting? Yup. I can only see rq -> rq_dev being set in sg_io(), but then again, you could write the amount of C I know on a small postage stamp. ^_^ recompiled with the two assignments in under CDROMEJECT it works fine. Thanks -- /__ \_|\/ /\ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.5.44-ac4 scsi CDROMEJECT problem 2002-10-28 10:54 ` Nyk Tarr @ 2002-10-28 10:57 ` Jens Axboe 2002-10-28 11:41 ` Nyk Tarr 0 siblings, 1 reply; 5+ messages in thread From: Jens Axboe @ 2002-10-28 10:57 UTC (permalink / raw) To: Nyk Tarr; +Cc: linux-kernel, Alan Cox On Mon, Oct 28 2002, Nyk Tarr wrote: > On Mon, Oct 28, 2002 at 09:15:07AM +0100, Jens Axboe wrote: > > On Sun, Oct 27 2002, Nyk Tarr wrote: > > > Hi > > > > > > This patch of Jens Axboe was missing from 2.5.44-ac4. Was this by design > > > or accidental? > > > > Please check blk_do_rq(), it sets rq_dev and rq_disk. So it's indeed > > intentional. Since you ask, do you have problems ejecting? > > Yup. > > I can only see rq -> rq_dev being set in sg_io(), but then again, you > could write the amount of C I know on a small postage stamp. ^_^ > > recompiled with the two assignments in under CDROMEJECT it works fine. I just checked the -ac4 patch, and bits are indeed missing. The recommended patch against -ac4 is: --- drivers/block/scsi_ioctl.c~ 2002-10-25 19:00:11.000000000 +0200 +++ drivers/block/scsi_ioctl.c 2002-10-25 19:01:15.000000000 +0200 @@ -37,11 +37,14 @@ #define BLK_DEFAULT_TIMEOUT (60 * HZ) -int blk_do_rq(request_queue_t *q, struct request *rq) +int blk_do_rq(request_queue_t *q, struct block_device *bdev, struct request *rq) { DECLARE_COMPLETION(wait); int err = 0; + rq->rq_dev = to_kdev_t(bdev->bd_dev); + rq->rq_disk = bdev->bd_disk; + /* * we need an extra reference to the request, so we can look at * it after io completion @@ -221,9 +224,6 @@ if (writing) rq->flags |= REQ_RW; - rq->rq_dev = to_kdev_t(bdev->bd_dev); - rq->rq_disk = bdev->bd_disk; - rq->hard_nr_sectors = rq->nr_sectors = nr_sectors; rq->hard_cur_sectors = rq->current_nr_sectors = nr_sectors; @@ -253,7 +253,7 @@ * return -EIO if we didn't transfer all data, caller can look at * residual count to find out how much did succeed */ - err = blk_do_rq(q, rq); + err = blk_do_rq(q, bdev, rq); if (rq->data_len > 0) err = -EIO; @@ -325,7 +325,7 @@ memset(rq->cmd, 0, sizeof(rq->cmd)); rq->cmd[0] = GPCMD_START_STOP_UNIT; rq->cmd[4] = 0x02 + (close != 0); - err = blk_do_rq(q, rq); + err = blk_do_rq(q, bdev, rq); blk_put_request(rq); break; default: I think Alan dropped this last bit (or maybe it didn't apply for him, dunno), at least I know it was sent. -- Jens Axboe ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.5.44-ac4 scsi CDROMEJECT problem 2002-10-28 10:57 ` Jens Axboe @ 2002-10-28 11:41 ` Nyk Tarr 0 siblings, 0 replies; 5+ messages in thread From: Nyk Tarr @ 2002-10-28 11:41 UTC (permalink / raw) To: Jens Axboe; +Cc: linux-kernel On Mon, Oct 28, 2002 at 11:57:54AM +0100, Jens Axboe wrote: > On Mon, Oct 28 2002, Nyk Tarr wrote: > > On Mon, Oct 28, 2002 at 09:15:07AM +0100, Jens Axboe wrote: > > > On Sun, Oct 27 2002, Nyk Tarr wrote: > > > > Hi > > > > > > > > This patch of Jens Axboe was missing from 2.5.44-ac4. Was this by design > > > > or accidental? > > > > > > Please check blk_do_rq(), it sets rq_dev and rq_disk. So it's indeed > > > intentional. Since you ask, do you have problems ejecting? > > > > Yup. > > > > I can only see rq -> rq_dev being set in sg_io(), but then again, you > > could write the amount of C I know on a small postage stamp. ^_^ > > > > recompiled with the two assignments in under CDROMEJECT it works fine. > > I just checked the -ac4 patch, and bits are indeed missing. The > recommended patch against -ac4 is: > [snip] > > I think Alan dropped this last bit (or maybe it didn't apply for him, > dunno), at least I know it was sent. Applies clean here. I'll try it later. Thanks. Nyk -- /__ \_|\/ /\ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-10-28 11:35 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-10-27 22:31 2.5.44-ac4 scsi CDROMEJECT problem Nyk Tarr 2002-10-28 8:15 ` Jens Axboe 2002-10-28 10:54 ` Nyk Tarr 2002-10-28 10:57 ` Jens Axboe 2002-10-28 11:41 ` Nyk Tarr
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox