kern/151564: [ciss] ciss(4) should increase CISS_MAX_LOGICAL to 107

xenophon\+freebsd xenophon+freebsd at irtnog.org
Thu Dec 20 15:20:01 UTC 2012


The following reply was made to PR kern/151564; it has been noted by GNATS.

From: "xenophon\\+freebsd" <xenophon+freebsd at irtnog.org>
To: <bug-followup at FreeBSD.org>,
	<leon.kos at lecad.fs.uni-lj.si>,
	<freebsd-scsi at freebsd.org>
Cc:  
Subject: Re: kern/151564: [ciss] ciss(4) should increase  CISS_MAX_LOGICAL to 107
Date: Thu, 20 Dec 2012 10:10:37 -0500

 This is a multi-part message in MIME format.
 
 ------_=_NextPart_001_01CDDEC4.2B270089
 Content-Type: text/plain;
 	charset="us-ascii"
 Content-Transfer-Encoding: quoted-printable
 
 All:
 
 I've created a patch (see attached) for the ciss driver that makes the
 following changes:
 
 *	creates a boot-time tunable (hw.ciss.max_logical) that allows
 changing the maximum number of logical drives (defaults to
 CISS_MAX_LOGICAL, which currently is 15 according to
 src/sys/dev/ciss/cissvar.h)
 
 *	changes the behavior of another boot-time tunable
 (hw.ciss.expose_hidden_physical) such that a value of 2 exposes hidden
 physical direct access devices as da(4) devices, where a value of 1
 retains the original behavior of exposing them only as pass(4) devices
 
 *	updates the ciss(4) manual page regarding the above
 modifications
 
 Would a committer be willing to review this patch for potential
 inclusion into some future release of FreeBSD?  I hereby place this
 patch into the public domain.
 
 I tested this successfully using FreeBSD/x86 9.0-RELEASE-p5 on an HP
 ProLiant DL380 G3 with an on-board Smart Array 5i controller.  For
 example, I have 20 single-disk RAID-0 arrays.  Without the patch, the
 ciss driver returns the error "adapter claims to report absurd number of
 logical drives".  With the patch applied and hw.ciss.max_logical set to
 32 in /boot/loader.conf, the ciss driver correctly detects and
 configures all twenty logical drives.  Furthermore, with
 hw.ciss.expose_hidden_physical to 2, the ciss driver also correctly
 exposes the physical disks underlying each of the 20 arrays as da(4)
 devices.
 
 I plan to test this patch next week using FreeBSD/amd64 on a DL380 G4,
 which has similar specs to my G3.
 
 Best wishes,
 Matthew
 
 --=20
 I FIGHT FOR THE USERS
 
 
 
 ------_=_NextPart_001_01CDDEC4.2B270089
 Content-Type: application/octet-stream;
 	name="ciss-tunable-maxlogical-exposehidden-da.patch"
 Content-Transfer-Encoding: base64
 Content-Description: ciss-tunable-maxlogical-exposehidden-da.patch
 Content-Disposition: attachment;
 	filename="ciss-tunable-maxlogical-exposehidden-da.patch"
 
 SW5kZXg6IHN5cy9kZXYvY2lzcy9jaXNzLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Rldi9jaXNzL2Np
 c3MuYwkocmV2aXNpb24gMjQ0MzYxKQorKysgc3lzL2Rldi9jaXNzL2Npc3MuYwkod29ya2luZyBj
 b3B5KQpAQCAtMjQ1LDYgKzI0NSw5IEBACiAvKgogICogVGhpcyB0dW5hYmxlIGNhbiBiZSBzZXQg
 YXQgYm9vdCB0aW1lIGFuZCBjb250cm9scyB3aGV0aGVyIHBoeXNpY2FsIGRldmljZXMKICAqIHRo
 YXQgYXJlIG1hcmtlZCBoaWRkZW4gYnkgdGhlIGZpcm13YXJlIHNob3VsZCBiZSBleHBvc2VkIGFu
 eXdheXMuCisgKiAgICAwIDogaGlkZSAoZGVmYXVsdCkKKyAqICAgIDEgOiBleHBvc2U7IGV4cG9y
 dCBkaXNrcyBhcyBwYXNzdGhyb3VnaCBkZXZpY2VzCisgKiAgICAyIDogZXhwb3NlOyBleHBvcnQg
 ZGlza3MgYXMgZGlyZWN0LWFjY2VzcyBkZXZpY2VzCiAgKi8KIHN0YXRpYyB1bnNpZ25lZCBpbnQg
 Y2lzc19leHBvc2VfaGlkZGVuX3BoeXNpY2FsID0gMDsKIFRVTkFCTEVfSU5UKCJody5jaXNzLmV4
 cG9zZV9oaWRkZW5fcGh5c2ljYWwiLCAmY2lzc19leHBvc2VfaGlkZGVuX3BoeXNpY2FsKTsKQEAg
 LTI3MCw2ICsyNzMsMT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