From: Kurt Garloff <garloff@suse.de>
To: Linux SCSI list <linux-scsi@vger.kernel.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>,
Andrew Morton <akpm@osdl.org>
Subject: [PATCH] 4/6: scsi_allow_ghost_devices
Date: Sun, 18 Apr 2004 20:59:50 +0200 [thread overview]
Message-ID: <20040418185950.GG4868@tpkurt.garloff.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]
Feature.
scsi_allow_ghost_devices=N
This patch introduces a boot/module parameter that allows the user to tell
the kernel to NOT set the first N devices to offline despite they would
normally be. Needed for some EMC multipathing devices.
This parameter is even documented in EMC docs as both RH and SUSE had
such a parameter in their 2.4 vendor kernels :-/
--- linux-2.6.5.noreplunhost/drivers/scsi/scsi_scan.c.orig 2004-04-15 22:42:48.544207000 +0200
+++ linux-2.6.5.noreplunhost/drivers/scsi/scsi_scan.c 2004-04-15 22:51:08.291252857 +0200
@@ -119,6 +119,12 @@ module_param_named(scsi_reportlun2, scsi
MODULE_PARM_DESC(scsi_reportlun2,
"Use REPORT_LUNs for scanning SCSI-2 devs as well");
+static unsigned int scsi_allow_ghost_devices;
+module_param_named(scsi_allow_ghost_devices ,scsi_allow_ghost_devices, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(scsi_allow_ghost_devices,
+ "allow devices marked as being offline to be accessed anyway "
+ "(0 = off, else allow ghosts on lun 0 through allow_ghost_devices - 1");
+
/**
* scsi_unlock_floptical - unlock device via a special MODE SENSE command
@@ -573,7 +579,8 @@ static int scsi_add_lun(struct scsi_devi
* otherwise, offline devices still get an sd allocated, and they
* use up an sd slot.
*/
- if (((inq_result[0] >> 5) & 7) == 1) {
+ if (((inq_result[0] >> 5) & 7) == 1 &&
+ (sdev->lun >= scsi_allow_ghost_devices)) {
SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO "scsi scan: peripheral"
" qualifier of 1, device offlined\n"));
sdev->online = FALSE;
--
Kurt Garloff <garloff@suse.de> Cologne, DE
SUSE LINUX AG, Nuernberg, DE SUSE Labs (Head)
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2004-04-18 19:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-18 18:59 Kurt Garloff [this message]
2004-04-18 19:20 ` [PATCH] 4/6: scsi_allow_ghost_devices Christoph Hellwig
2004-04-18 22:14 ` Kurt Garloff
2004-04-19 7:34 ` Arjan van de Ven
2004-04-19 12:06 ` Doug Ledford
2004-04-19 12:14 ` Christoph Hellwig
2004-04-19 13:34 ` Matthew Wilcox
2004-04-20 17:34 ` Patrick Mansfield
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=20040418185950.GG4868@tpkurt.garloff.de \
--to=garloff@suse.de \
--cc=James.Bottomley@steeleye.com \
--cc=akpm@osdl.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