From: Bill Nottingham <notting@redhat.com>
To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Cc: Bill Nottingham <notting@redhat.com>
Subject: [PATCH] Add a 'wait-scan' command to /proc/scsi/scsi.
Date: Wed, 25 Mar 2009 15:00:46 -0400 [thread overview]
Message-ID: <1238007647-25752-1-git-send-email-notting@redhat.com> (raw)
scsi_wait_scan.ko is a bad interface for a variety of reasons:
- once you load it, it stays in memory doing nothing
- if you need to call it again, you first need to check for the module
and unload it first
- waiting for scsi scans shouldn't require module loading privleges in
any case
This creates a simpler interface that doesn't require as much
scaffolding in userspace.
Signed-off-by: Bill Nottingham <notting@redhat.com>
---
drivers/scsi/scsi_proc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
index 82f7b2d..c9f9e0c 100644
--- a/drivers/scsi/scsi_proc.c
+++ b/drivers/scsi/scsi_proc.c
@@ -370,6 +370,8 @@ static ssize_t proc_scsi_write(struct file *file, const char __user *buf,
lun = simple_strtoul(p + 1, &p, 0);
err = scsi_remove_single_device(host, channel, id, lun);
+ } else if (!strncmp("scsi wait-scan", buffer, 14)) {
+ err = scsi_complete_async_scans();
}
/*
--
1.6.2
next reply other threads:[~2009-03-25 19:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-25 19:00 Bill Nottingham [this message]
2009-03-25 19:00 ` [PATCH] Declare PIO_CMAP/GIO_CMAP as compatbile ioctls Bill Nottingham
2009-03-25 19:02 ` Bill Nottingham
2009-03-25 19:01 ` [PATCH] Add a 'wait-scan' command to /proc/scsi/scsi Christoph Hellwig
2009-03-25 19:03 ` Bill Nottingham
2009-03-25 19:26 ` Matthew Wilcox
2009-03-25 19:47 ` Bill Nottingham
2009-03-25 20:36 ` Matthew Wilcox
2009-03-26 14:47 ` Bill Nottingham
2009-03-26 17:25 ` Kay Sievers
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=1238007647-25752-1-git-send-email-notting@redhat.com \
--to=notting@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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
Powered by JetHome