From: Mark v Wolher <trilight@ns666.com>
To: Jens Axboe <axboe@suse.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Badness in as_insert_request at drivers/block/as-iosched.c:1519
Date: Sat, 07 Jan 2006 16:03:19 +0100 [thread overview]
Message-ID: <43BFD837.6080704@ns666.com> (raw)
In-Reply-To: <20060107145520.GH3389@suse.de>
Jens Axboe wrote:
> On Sat, Jan 07 2006, Mark v Wolher wrote:
>
>>Jens Axboe wrote:
>>
>>>On Sat, Jan 07 2006, Mark v Wolher wrote:
>>>
>>>
>>>>Hiya all,
>>>>
>>>>I was just playing a cd as usual and i noticed suddenly the errors
>>>>below, they repeated like 8 times.
>>>>
>>>>kernel: 2.6.14.5
>>>
>>>
>>>Should be fixed in newer 2.6.14.x, and in 2.6.15.
>>>
>>
>>Looks like it isn't :( , well in 2.6.14.5
>
>
> Oh, indeed. 2.6.15 has it fixed though. For 2.6.14.5 you have two
> choices:
>
> 1) Delete the warning from as-iosched.c. It's harmless, it doesn't
> indicate a bug in this case.
>
> 2) Apply this attached patch to prevent cdrom.c from reusing a request
> when doing single frame cdda dma.
>
> diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
> index 1539603..7540d27 100644
> --- a/drivers/cdrom/cdrom.c
> +++ b/drivers/cdrom/cdrom.c
> @@ -2089,7 +2089,7 @@ static int cdrom_read_cdda_bpc(struct cd
> int lba, int nframes)
> {
> request_queue_t *q = cdi->disk->queue;
> - struct request *rq;
> + struct request *rq = NULL;
> struct bio *bio;
> unsigned int len;
> int nr, ret = 0;
> @@ -2097,13 +2097,13 @@ static int cdrom_read_cdda_bpc(struct cd
> if (!q)
> return -ENXIO;
>
> - rq = blk_get_request(q, READ, GFP_KERNEL);
> - if (!rq)
> - return -ENOMEM;
> -
> cdi->last_sense = 0;
>
> while (nframes) {
> + rq = blk_get_request(q, READ, GFP_KERNEL);
> + if (!rq)
> + return -ENOMEM;
> +
> nr = nframes;
> if (cdi->cdda_method == CDDA_BPC_SINGLE)
> nr = 1;
> @@ -2151,9 +2151,13 @@ static int cdrom_read_cdda_bpc(struct cd
> nframes -= nr;
> lba += nr;
> ubuf += len;
> + blk_put_request(rq);
> + rq = NULL;
> }
>
> - blk_put_request(rq);
> + if (rq)
> + blk_put_request(rq);
> +
> return ret;
> }
>
>
Ah ok, thanks alot mate ! I think i'll patch it until i switch to 2.6.15.
Thanks again !
Mark
next prev parent reply other threads:[~2006-01-07 15:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-07 13:37 Badness in as_insert_request at drivers/block/as-iosched.c:1519 Mark v Wolher
2006-01-07 13:49 ` Mark v Wolher
2006-01-07 14:33 ` Mark v Wolher
2006-01-07 14:34 ` Jens Axboe
2006-01-07 14:50 ` Mark v Wolher
2006-01-07 14:55 ` Jens Axboe
2006-01-07 15:03 ` Mark v Wolher [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-10-31 20:40 Bongani Hlope
2005-11-01 6:59 ` Jens Axboe
2005-11-01 20:47 ` Bongani Hlope
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=43BFD837.6080704@ns666.com \
--to=trilight@ns666.com \
--cc=axboe@suse.de \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.