From: Boaz Harrosh <bharrosh@panasas.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Jens Axboe <jens.axboe@oracle.com>
Cc: linux-scsi@vger.kernel.org, bzolnier@gmail.com,
linux-ide@vger.kernel.org
Subject: Re: [PATCH 5/6] ide: use blk_rq_init() to initialize the request
Date: Sun, 27 Apr 2008 14:42:23 +0300 [thread overview]
Message-ID: <4814669F.3040001@panasas.com> (raw)
In-Reply-To: <1209140607-28654-6-git-send-email-fujita.tomonori@lab.ntt.co.jp>
On Fri, Apr 25 2008 at 19:23 +0300, FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> This converts ide to use blk_rq_init to initialize the request.
>
> This is a preparation for large command support, which needs to
> initialize the request in a proper way (that is, just doing a memset()
> will not work).
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Cc: Jens Axboe <jens.axboe@oracle.com>
> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Please, if not to late, add:
Cc: Boaz Harrosh <bharrosh@panasas.com>
> ---
> drivers/ide/ide-io.c | 3 +--
> drivers/ide/ide-tape.c | 2 +-
> drivers/ide/ide-taskfile.c | 3 +--
> drivers/ide/ide.c | 4 ++--
> 4 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
> index 31e5afa..7a3d605 100644
> --- a/drivers/ide/ide-io.c
> +++ b/drivers/ide/ide-io.c
> @@ -1601,8 +1601,7 @@ irqreturn_t ide_intr (int irq, void *dev_id)
>
> void ide_init_drive_cmd (struct request *rq)
> {
> - memset(rq, 0, sizeof(*rq));
> - rq->ref_count = 1;
> + blk_rq_init(NULL, rq);
> }
>
> EXPORT_SYMBOL(ide_init_drive_cmd);
> diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
> index f43fd07..f1227e5 100644
> --- a/drivers/ide/ide-tape.c
> +++ b/drivers/ide/ide-tape.c
> @@ -899,7 +899,7 @@ static void idetape_create_request_sense_cmd(struct ide_atapi_pc *pc)
>
> static void idetape_init_rq(struct request *rq, u8 cmd)
> {
> - memset(rq, 0, sizeof(*rq));
> + blk_rq_init(NULL, rq);
> rq->cmd_type = REQ_TYPE_SPECIAL;
> rq->cmd[0] = cmd;
> }
> diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
> index 155cc90..997b99c 100644
> --- a/drivers/ide/ide-taskfile.c
> +++ b/drivers/ide/ide-taskfile.c
> @@ -532,8 +532,7 @@ int ide_raw_taskfile(ide_drive_t *drive, ide_task_t *task, u8 *buf, u16 nsect)
> {
> struct request rq;
>
> - memset(&rq, 0, sizeof(rq));
> - rq.ref_count = 1;
> + blk_rq_init(NULL, &rq);
> rq.cmd_type = REQ_TYPE_ATA_TASKFILE;
> rq.buffer = buf;
>
> diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
> index 917c72d..dfe3ba5 100644
> --- a/drivers/ide/ide.c
> +++ b/drivers/ide/ide.c
> @@ -689,7 +689,7 @@ static int generic_ide_suspend(struct device *dev, pm_message_t mesg)
> if (!(drive->dn % 2))
> ide_acpi_get_timing(hwif);
>
> - memset(&rq, 0, sizeof(rq));
> + blk_rq_init(NULL, &rq);
> memset(&rqpm, 0, sizeof(rqpm));
> memset(&args, 0, sizeof(args));
> rq.cmd_type = REQ_TYPE_PM_SUSPEND;
> @@ -727,7 +727,7 @@ static int generic_ide_resume(struct device *dev)
>
> ide_acpi_exec_tfs(drive);
>
> - memset(&rq, 0, sizeof(rq));
> + blk_rq_init(NULL, &rq);
> memset(&rqpm, 0, sizeof(rqpm));
> memset(&args, 0, sizeof(args));
> rq.cmd_type = REQ_TYPE_PM_RESUME;
next prev parent reply other threads:[~2008-04-27 11:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-25 16:23 [PATCH 0/6] add large command support to the block layer FUJITA Tomonori
2008-04-25 16:40 ` [PATCH 1/6] block: no need to initialize rq->cmd in prepare_flush_fn hook FUJITA Tomonori
2008-04-25 16:23 ` [PATCH 2/6] block: no need to initialize rq->cmd with blk_get_request FUJITA Tomonori
2008-04-25 16:23 ` [PATCH 3/6] block: rename and export rq_init() FUJITA Tomonori
2008-04-25 16:23 ` [PATCH 4/6] block: use blk_rq_init() to initialize the request FUJITA Tomonori
2008-04-25 16:23 ` [PATCH 5/6] ide: " FUJITA Tomonori
2008-04-25 16:23 ` [PATCH 6/6] block: add large command support FUJITA Tomonori
2008-04-27 11:43 ` Boaz Harrosh
2008-04-27 11:42 ` Boaz Harrosh [this message]
2008-04-27 11:41 ` [PATCH 4/6] block: use blk_rq_init() to initialize the request Boaz Harrosh
2008-04-27 11:41 ` [PATCH 3/6] block: rename and export rq_init() Boaz Harrosh
2008-04-25 16:45 ` [dm-devel] [PATCH 2/6] block: no need to initialize rq->cmd with blk_get_request James Bottomley
2008-04-25 16:54 ` FUJITA Tomonori
2008-04-25 16:59 ` James Bottomley
2008-04-25 18:35 ` FUJITA Tomonori
2008-04-29 7:54 ` [PATCH 0/6] add large command support to the block layer Jens Axboe
2008-04-29 11:55 ` Bartlomiej Zolnierkiewicz
2008-04-29 12:32 ` FUJITA Tomonori
2008-04-29 12:37 ` Jens Axboe
2008-04-29 12:45 ` FUJITA Tomonori
2008-04-29 12:46 ` 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=4814669F.3040001@panasas.com \
--to=bharrosh@panasas.com \
--cc=bzolnier@gmail.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jens.axboe@oracle.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).