public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Rosenboom <jens.rosenboom@freenet.ag>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Oops when writing to /sys/block/ram0/queue/max_sectors_kb
Date: Tue, 28 Jul 2009 11:30:57 +0200	[thread overview]
Message-ID: <20090728093057.GJ21919@bo.mcbone.net> (raw)
In-Reply-To: <20090728070711.GN4148@kernel.dk>

On Tue, Jul 28, 2009 at 09:07:11AM +0200, Jens Axboe wrote:
[...]
> Looks like this will hit nonrot/merge/etc store functions after we
> exposed these sysfs knobs for non-request_fn drivers too. Can you try
> the below? Should fix all of them up.
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 4b45435..a0c340d 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -575,13 +575,6 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)
>  		return NULL;
>  	}
>  
> -	/*
> -	 * if caller didn't supply a lock, they get per-queue locking with
> -	 * our embedded lock
> -	 */
> -	if (!lock)
> -		lock = &q->__queue_lock;
> -
>  	q->request_fn		= rfn;
>  	q->prep_rq_fn		= NULL;
>  	q->unplug_fn		= generic_unplug_device;
> diff --git a/block/blk-settings.c b/block/blk-settings.c
> index bd582a7..8a3ea3b 100644
> --- a/block/blk-settings.c
> +++ b/block/blk-settings.c
> @@ -165,6 +165,13 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn)
>  	blk_set_default_limits(&q->limits);
>  
>  	/*
> +	 * If the caller didn't supply a lock, fall back to our embedded
> +	 * per-queue locks
> +	 */
> +	if (!q->queue_lock)
> +		q->queue_lock = &q->__queue_lock;
> +
> +	/*
>  	 * by default assume old behaviour and bounce for any highmem page
>  	 */
>  	blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);

Works for me, no more Oopses.

  reply	other threads:[~2009-07-28  9:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23 15:30 Oops when writing to /sys/block/ram0/queue/max_sectors_kb Jens Rosenboom
2009-07-28  7:07 ` Jens Axboe
2009-07-28  9:30   ` Jens Rosenboom [this message]
2009-07-28 10:04     ` 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=20090728093057.GJ21919@bo.mcbone.net \
    --to=jens.rosenboom@freenet.ag \
    --cc=jens.axboe@oracle.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox