#define MAX_FNUMS (MAX_OPEN_FILES...)
sharpe at ns.aus.com
Sat Jul 25 23:11:51 GMT 1998
At 03:50 PM 7/24/98 +1000, tridge at samba.anu.edu.au wrote:
>> To fit in with what I am suggesting, I think I will need to following
>> In server.c:
>> int max_open_files = 0; /* Will have to be extern in other files */
>> int max_open_directories = 0;
>> plus some other code to set these to real or default values depending on
>> what happens in reload_services.
>> In local.h:
>> #define MAX_FNUMS (max_open_files+max_open_directories)
>> This minimizes the changes I need to make, but means that the code is more
>> difficult to understand.
>> Does anyone think I should do it differently?
>That certainly is the easiest way, but what I'd rather see is a new
>files.c module with a little set of access functions so that the
>actual data structure used is hidden from all other modules. The array
>(or whatever you choose to use) would then be static inside that
Well, I agree with this ... However, it will be more work :-(
>The main reason is that we will have to eventually drop the current
>linear array format for Files in order to handle really large
>arrays. It is just to slow to scan it linearly as we now do in several
>places (such as the oplock code).
>Probably a good way to proceed is to use the current linear array
>stuff but just hide it in files.c then we (or Chris!) can look at what
>data structure is most appropriate when the need arises.
OK, I will look at taking this approach, as I think we need to move Samba
toward being more modular.
> - Tridge
Richard Sharpe, sharpe at ns.aus.com, NIC-Handle:RJS96
NS Computer Software and Services P/L,
Ph: +61-8-8281-0063, FAX: +61-8-8250-2080,
Samba, Linux, Apache, Digital UNIX, AIX, Netscape, Stronghold, C, ...
More information about the samba-technical