All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: "Mike Miller (OS Dev)" <mikem@beardog.cca.cpqcorp.net>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 9/12] repost: cciss: add busy_configuring flag
Date: Mon, 6 Nov 2006 21:32:00 +0100	[thread overview]
Message-ID: <20061106203200.GG19471@kernel.dk> (raw)
In-Reply-To: <20061106202559.GI17847@beardog.cca.cpqcorp.net>

On Mon, Nov 06 2006, Mike Miller (OS Dev) wrote:
> PATCH 9 of 12
> 
> This patch adds a check for busy_configuring to prevent starting a queue
> on a drive that may be in the midst of updating, configuring, deleting, etc.
> 
> This had a test for if the queue was stopped or plugged but that seemed
> to cause issues.
> Please consider this for inclusion.
> 
> Thanks,
> mikem
> 
> Signed-off-by: Mike Miller <mike.miller@hp.com>
> 
> --------------------------------------------------------------------------------
> 
> ---
> 
>  drivers/block/cciss.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff -puN drivers/block/cciss.c~cciss_busy_conf_for_lx2619-rc4 drivers/block/cciss.c
> --- linux-2.6/drivers/block/cciss.c~cciss_busy_conf_for_lx2619-rc4	2006-11-06 13:27:53.000000000 -0600
> +++ linux-2.6-root/drivers/block/cciss.c	2006-11-06 13:27:53.000000000 -0600
> @@ -1190,8 +1190,11 @@ static void cciss_check_queues(ctlr_info
>  		/* make sure the disk has been added and the drive is real
>  		 * because this can be called from the middle of init_one.
>  		 */
> -		if (!(h->drv[curr_queue].queue) || !(h->drv[curr_queue].heads))
> +		if (!(h->drv[curr_queue].queue) ||
> +		    !(h->drv[curr_queue].heads) ||
> +		    h->drv[curr_queue].busy_configuring)
>  			continue;
> +
>  		blk_start_queue(h->gendisk[curr_queue]->queue);

This is racy, because you don't start the queue when you unset
->busy_configuring later on. For this to be safe, you need to call
blk_start_queue() when you set ->busy_configuring to 0.

-- 
Jens Axboe


  reply	other threads:[~2006-11-06 20:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-06 20:25 [PATCH 9/12] repost: cciss: add busy_configuring flag Mike Miller (OS Dev)
2006-11-06 20:32 ` Jens Axboe [this message]
2006-12-12 17:01   ` Mike Miller (OS Dev)
2006-12-13 12:52     ` Jens Axboe
2007-01-19 17:42       ` dann frazier
2007-01-21  4:07         ` 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=20061106203200.GG19471@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mikem@beardog.cca.cpqcorp.net \
    /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.