RE: Storage Interface for squid

From: Meghna Dhar <mdhar@dont-contact.us>
Date: Mon, 3 Jun 2002 15:48:17 -0400

When considering which file number to give, I cannot see anywhere in
storeUfsDirMapBitAllocate(), where the directory is considered.
I am assuming that the directory is decided first and then accordingly
the file number is decided. If the file number is decided on the basis
of a bit map, then where do those 2 formula ( for D1,D2,L1,L2,N) come
into picture ?

I am still unclear about this. Please help.
Thanks,
Meghna

-----Original Message-----
From: Henrik Nordstrom [mailto:hno@marasystems.com]
Sent: Monday, June 03, 2002 4:49 AM
To: mdhar@ECECS.UC.EDU
Cc: Squid Developers Mailinglist
Subject: Re: Storage Interface for squid

On Monday 03 June 2002 02:33, Meghna Dhar wrote:
> Thanks once again, Henrik.
> Actually, I am not using this scheme in my implementation. I just
> wanted to write a system (using the squid scheme), so that I could
> compare my system with Squid.

Good.

> One more question .... when I get a Url request, the only thing
> that is unique about it is its MD5 ... right ??? Then how does
> Squid give it a file number (int)?

The store implementation does, and then calls the file_callback. See
storeCreate() / createobj.

In the "ufs" familiy of stores the swafile number is allocated via a
bitmap. See storeUfsDirMapBitAllocate(). Basically starting at the
last allocated + 1, returning the next free number.

> Or is it the other way ?? The directories are first selected(based
> on least load and round robin) and then the file numbers are given
> accordingly .

The cache_dir is first selected based on the policy set by
store_dir_select_algorithm (current policies are least-load and
round-robin), then the store implementation of that specific
cache_dir assigns the number within that store while the object is
being stored.

Ps. Please keep squid-dev in the CC list.

Regards
Henrik
Received on Mon Jun 03 2002 - 13:48:23 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:34 MST