From: David Miller <davem@davemloft.net>
To: bzolnier@gmail.com
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
petkovbb@gmail.com, htejun@gmail.com
Subject: Re: [patch 2/6] ide: fix ide_kill_rq() for special ide-{floppy,tape} driver requests
Date: Tue, 23 Jun 2009 16:16:11 -0700 (PDT) [thread overview]
Message-ID: <20090623.161611.139291300.davem@davemloft.net> (raw)
In-Reply-To: <200906232326.06830.bzolnier@gmail.com>
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date: Tue, 23 Jun 2009 23:26:06 +0200
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] ide: fix ide_kill_rq() for special ide-{floppy,tape} driver requests
>
> Such requests should be failed with -EIO (like all other requests
> in this function) instead of being completed successfully.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
> Untested, you may try pinging Borislav and/or Tejun about possible
> testing if you would like to verify the patch before applying.
This must be tested in some way. I can see this potentially
breaking something.
Especially this is true because ide_complete_rq() does it's
"complete whole request right now" logic for error <= 0.
Borislov/Tejun, can either of you test this code path with this
change applied? I'd very much appreciate it.
Thanks!
> drivers/ide/ide-io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: b/drivers/ide/ide-io.c
> ===================================================================
> --- a/drivers/ide/ide-io.c
> +++ b/drivers/ide/ide-io.c
> @@ -152,7 +152,7 @@ void ide_kill_rq(ide_drive_t *drive, str
>
> if ((media == ide_floppy || media == ide_tape) && drv_req) {
> rq->errors = 0;
> - ide_complete_rq(drive, 0, blk_rq_bytes(rq));
> + ide_complete_rq(drive, -EIO, blk_rq_bytes(rq));
> } else {
> if (media == ide_tape)
> rq->errors = IDE_DRV_ERROR_GENERAL;
next prev parent reply other threads:[~2009-06-23 23:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 21:26 Bartlomiej Zolnierkiewicz
2009-06-23 23:16 ` David Miller [this message]
2009-06-24 0:49 ` Bartlomiej Zolnierkiewicz
2009-06-24 7:08 ` Borislav Petkov
2009-06-24 6:49 ` David Miller
2009-06-24 10:09 ` Bartlomiej Zolnierkiewicz
2009-06-24 10:39 ` David Miller
2009-06-24 17:44 ` Borislav Petkov
2009-06-25 10:09 ` David Miller
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=20090623.161611.139291300.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bzolnier@gmail.com \
--cc=htejun@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@gmail.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
all inboxes | Powered by JetHome®