From: "vijay srinath" <vijaysrinath@lycos.com>
To: linux-kernel@vger.kernel.org
Subject: Question on scsi disk driver
Date: Mon, 24 Feb 2003 12:58:57 0000 [thread overview]
Message-ID: <AFIFLLKIMJDOIDAA@mailcity.com> (raw)
hello all,
Iam running Linux Kernel 2.4.9. I have a disk array with a more than 128 luns. Since the maximum number of disk luns that sd driver can see is 128, i expected to see atleast 128. But i noticed that i was not able to access any lun at all.
I investigated further and saw that sd_init() in sd.c was returning a failure. This was because the code where memory is alloc'd for 'hd_struct' structures was failing. The code snippet is below
<snip>
/*
* FIXME: should unregister blksize_size, hardsect_size and max_sectors
when
* the module is unloaded.
*/
sd = kmalloc((sd_template.dev_max << 4) *
sizeof(struct hd_struct),
GFP_ATOMIC);
if (!sd)
goto cleanup_sd;
<snip>
The reason is if dev_max is 128, then the total mem size being malloc'd becomes 139264. The highest value in the cache_size table is 131072 (slab.c) and apparently this seems to be causing the kmalloc to fail. In fact the kmalloc fails for any dev_max value greater than 120
Also, if i rebuild my kernel with CONFIG_SD_EXTRA_DEVS set to 128, then no matter how many devices i have connected to my host, sd_init() will always fail.
I did not have this problem with kernel 2.4.2-2, where in i notice that the check to see if 'sd' kmalloc was successful, was absent.
Iam not sure what the fix needs to be (whether to include the next size 262144 in the cache_sizes table or whether to remove the check like in 2.4.2-2).
Appreciate any response on this. Thanks so much in advance..
regards
vijay
_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
next reply other threads:[~2003-02-24 12:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-24 12:58 vijay srinath [this message]
2003-02-24 13:24 ` Question on scsi disk driver Christoph Hellwig
2003-02-24 13:28 ` Arjan van de Ven
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=AFIFLLKIMJDOIDAA@mailcity.com \
--to=vijaysrinath@lycos.com \
--cc=linux-kernel@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 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.