From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Jens Axboe <axboe@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>,
James Bottomley <James.Bottomley@steeleye.com>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: device suspend/resume
Date: Fri, 27 May 2005 00:56:19 +0200 [thread overview]
Message-ID: <58cb370e0505261556788967a7@mail.gmail.com> (raw)
In-Reply-To: <20050525092952.GA7005@suse.de>
Nice work Jens, some feedback below:
On 5/25/05, Jens Axboe <axboe@suse.de> wrote:
> Index: drivers/ide/ide-floppy.c
> ===================================================================
> --- 137318b273db26b889675101fbd02d2e84cae5e3/drivers/ide/ide-floppy.c (mode:100644)
> +++ uncommitted/drivers/ide/ide-floppy.c (mode:100644)
> @@ -1311,9 +1311,9 @@
> }
> pc = idefloppy_next_pc_storage(drive);
> idefloppy_create_rw_cmd(floppy, pc, rq, block);
> - } else if (rq->flags & REQ_SPECIAL) {
> + } else if (blk_special_request(rq))
> pc = (idefloppy_pc_t *) rq->buffer;
> - } else if (rq->flags & REQ_BLOCK_PC) {
> + } else if (blk_fs_request(rq)) {
> pc = idefloppy_next_pc_storage(drive);
> if (idefloppy_blockpc_cmd(floppy, pc, rq)) {
> idefloppy_do_end_request(drive, 0, 0);
blk_pc_request(rq)
> Index: drivers/ide/ide-io.c
> ===================================================================
> --- 137318b273db26b889675101fbd02d2e84cae5e3/drivers/ide/ide-io.c (mode:100644)
> +++ uncommitted/drivers/ide/ide-io.c (mode:100644)
> @@ -948,9 +948,10 @@
> if (!drive->special.all) {
> ide_driver_t *drv;
>
> - if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK))
> + if (rq->cmd_type == REQ_TYPE_ATA_CMD ||
> + rq->cmd_type == REQ_TYPE_ATA_TASK)
> return execute_drive_cmd(drive, rq);
> - else if (rq->flags & REQ_DRIVE_TASKFILE)
> + else if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
> return execute_drive_cmd(drive, rq);
> else if (blk_pm_request(rq)) {
> #ifdef DEBUG_PM
|| rq->cmd_type == REQ_TYPE_ATA_TASKFILE while at it
> Index: drivers/scsi/ide-scsi.c
> ===================================================================
> --- 137318b273db26b889675101fbd02d2e84cae5e3/drivers/scsi/ide-scsi.c (mode:100644)
> +++ uncommitted/drivers/scsi/ide-scsi.c (mode:100644)
> @@ -370,12 +370,12 @@
> u8 *scsi_buf;
> unsigned long flags;
>
> - if (!(rq->flags & (REQ_SPECIAL|REQ_SENSE))) {
> + if (!blk_special_request(rq) || !blk_sense_request(rq)) {
> ide_end_request(drive, uptodate, nrsecs);
> return 0;
> }
!blk_special_request(rq) && !blk_sense_request(rq)
> Index: drivers/scsi/scsi_lib.c
> ===================================================================
> --- 137318b273db26b889675101fbd02d2e84cae5e3/drivers/scsi/scsi_lib.c (mode:100644)
> +++ uncommitted/drivers/scsi/scsi_lib.c (mode:100644)
> @@ -922,7 +922,7 @@
> /*
> * if this is a rq->data based REQ_BLOCK_PC, setup for a non-sg xfer
> */
> - if ((req->flags & REQ_BLOCK_PC) && !req->bio) {
> + if (blk_pc_request(req) && req->bio) {
> cmd->request_bufflen = req->data_len;
> cmd->request_buffer = req->data;
> req->buffer = req->data;
!req->bio
I assume they you've verified that there are no odd cases possible like
rq->flags = REQ_DRIVE_TASKFILE | REQ_BAR_FLUSH or rq->flags = REQ_PC
(without REQ_BLOCK_PC) which would be obviously broken by this patch?
Bartlomiej
next prev parent reply other threads:[~2005-05-26 22:56 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-23 20:15 [PATCH] libata: device suspend/resume Jeff Garzik
2005-05-23 20:41 ` James Bottomley
2005-05-23 20:45 ` Jeff Garzik
2005-05-23 22:10 ` James Bottomley
2005-05-24 6:21 ` Jens Axboe
2005-05-24 6:53 ` Jeff Garzik
2005-05-24 7:06 ` Hannes Reinecke
2005-05-24 7:08 ` Jens Axboe
2005-05-24 7:16 ` Jeff Garzik
2005-05-24 7:07 ` Jens Axboe
2005-05-24 7:10 ` Jeff Garzik
2005-05-24 7:13 ` Jens Axboe
2005-05-27 2:49 ` libata, SCSI and storage drivers Jeff Garzik
2005-05-27 6:45 ` Douglas Gilbert
2005-05-27 14:41 ` Luben Tuikov
2005-05-24 7:14 ` [PATCH] libata: device suspend/resume Hannes Reinecke
2005-05-24 7:15 ` Jens Axboe
2005-05-24 7:18 ` Jeff Garzik
2005-05-24 10:17 ` Douglas Gilbert
2005-05-24 17:10 ` Jeff Garzik
2005-05-24 7:59 ` Jens Axboe
2005-05-24 8:21 ` Jeff Garzik
2005-05-24 8:51 ` Jens Axboe
2005-05-24 16:37 ` Jeff Garzik
2005-05-25 9:29 ` Jens Axboe
2005-05-25 23:40 ` Guennadi Liakhovetski
2005-05-26 1:05 ` Jeff Garzik
2005-05-26 5:57 ` Jens Axboe
2005-05-26 22:56 ` Bartlomiej Zolnierkiewicz [this message]
2005-05-27 6:54 ` Jens Axboe
2005-05-27 2:01 ` Benjamin Herrenschmidt
2005-05-27 6:55 ` Jens Axboe
2005-05-24 13:48 ` Luben Tuikov
2005-05-24 17:29 ` Jeff Garzik
2005-05-24 13:05 ` Luben Tuikov
2005-05-27 2:54 ` Jeff Garzik
2005-05-24 16:27 ` Mark Lord
2005-05-24 16:33 ` Mark Lord
2005-05-24 16:04 ` Mark Lord
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=58cb370e0505261556788967a7@mail.gmail.com \
--to=bzolnier@gmail.com \
--cc=James.Bottomley@steeleye.com \
--cc=axboe@suse.de \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@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;
as well as URLs for NNTP newsgroup(s).