From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "Mike Miller (OS Dev)" <mikem@beardog.cca.cpqcorp.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jens Axboe <jens.axboe@oracle.com>,
LKML-SCSI <linux-scsi@vger.kernel.org>,
coldwell@redhat.com, hare@novell.com
Subject: Re: [PATCH 1/1] cciss: resubmit kernel scan thread for MSA2012
Date: Tue, 10 Mar 2009 10:50:41 -0500 [thread overview]
Message-ID: <1236700241.14822.4.camel@localhost.localdomain> (raw)
In-Reply-To: <20090310151738.GA18243@beardog.cca.cpqcorp.net>
On Tue, 2009-03-10 at 10:17 -0500, Mike Miller (OS Dev) wrote:
> Patch 1 of 1
>
> This is yet another go at the patch to detect changes on the MSA2012.
> I hope I've addressed all concerns. This patch rearranges some of the
> code
> so we also have coverage in the sg and the ioctl paths as well as the
> main
> data path.
>
> The MSA2012 cannot inform the driver of configuration changes since
> all
> management is out of band. This is a departure from any storage we
> have
> supported in the past. We need some way to detect changes on the
> topology so
> we implement this kernel thread. In some instances there's nothing we
> can do
> from the driver (like LUN failure) so just print out a message. In the
> case
> where logical volumes are added or deleted we call rebuild_lun_table
> to
> refresh the driver's view of the world.
>
> Changelog:
> 1. Do the completion(hba[i]->rescan_wait) before calling kthread_stop,
> this resolves the issue of waiting for the timeout on rmmod
> 2. Added a new function called check_ioctl_unit_attention to cover
> UA's
> from the ioctl patch
> 3. I preserved the wait_for_completion_timeout to avoid call traces
> caused by /proc/sys/kernel/hung_task_timeout_secs expiring
> 4. Moved the call to check_for_unit_attention to
> evaluate_target_status
> since it's already called from complete_command
> 5. Add retry_cmd as an argument to evaluate_target_status
> 6. Added *rescan_wait to the controller info struct
> 7. Changed wait_for_completion_timeout to
> wait_for_completion_interruptible.
> This will allow kthread_should_stop to stop the thread immediately
> with no race.
>
> Please consider this for inclusion.
>
> Signed-off-by: Mike Miller <mike.miller@hp.com>
[...]
> @@ -3834,6 +3917,9 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
> return;
> }
>
> + kthread_stop(hba[i]->cciss_scan_thread);
> + complete(hba[i]->rescan_wait);
This complete is superfluous (the kthread_stop will wake the
wait_for_completion_interruptible() and if it doesn't, you won't get to
the complete() because kthread_stop() waits for the thread to die).
Otherwise, the rest of this looks fine to me.
James
next prev parent reply other threads:[~2009-03-10 15:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-10 15:17 [PATCH 1/1] cciss: resubmit kernel scan thread for MSA2012 Mike Miller (OS Dev)
2009-03-10 15:46 ` Mike Miller (OS Dev)
2009-03-10 15:50 ` James Bottomley [this message]
2009-03-10 16:34 ` Mike Miller (OS Dev)
2009-03-10 22:39 ` Andrew Morton
2009-03-11 14:31 ` Mike Miller (OS Dev)
2009-03-11 15:21 ` Mike Miller (OS Dev)
2009-03-11 16:17 ` Mike Miller (OS Dev)
2009-03-11 22:14 ` Andrew Morton
2009-03-12 16:26 ` Mike Miller (OS Dev)
2009-06-15 20:39 ` Mike Miller (OS Dev)
2009-06-15 21:25 ` Andrew Morton
2009-06-15 22:17 ` Mike Miller (OS Dev)
2009-06-15 22:41 ` Andrew Morton
2009-06-16 19:07 ` Mike Miller (OS Dev)
2009-06-16 19:17 ` Andrew Morton
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=1236700241.14822.4.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=coldwell@redhat.com \
--cc=hare@novell.com \
--cc=jens.axboe@oracle.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox