Re: SCSI host numbers?

From: Itai Nahshon (nahshon@actcom.co.il)
Date: Tue Jan 15 2002 - 07:19:25 EST


On Monday 14 January 2002 08:36 am, Richard Gooch wrote:
> So how about in scsi_host_no_init() we call alloc_unique_number() N
> times until we've allocated the required number of host numbers for
> manual control. These will never be freed. Then all other host
> allocations can be done dynamically. We would just need a flag in the
> host structure to disable deallocation of the number if it's one of
> the reserved numbers.

See that dynamic hosts are also added to the list and *never* removed
from it (even when the host is unregistered). With that behaviour your
unique number functions would be an overkill because we must never
free host nubers.

I suggest these changes:
    max_scsi_host initialized in scsi_host_no_init.
    max_scsi_host never decremented.
That would fix the problem that I reported.
Than (cosmetic):
    rename next_scsi_host to count_scsi_hosts (or num_scsi_hosts)
because it actually just counts the number of registered scsi hosts.
The current name for that variable is confusing...

-- Itai

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 15 2002 - 21:00:50 EST