Re: Storage Interface for squid

From: Meghna Dhar <mdhar@dont-contact.us>
Date: Mon, 3 Jun 2002 23:56:38 -0400 (EDT)

Hi,
Thank you so much. The picture is much clearer now. I just have problems
understanding how the storeUfsDirMapBitAllocate() gives a file number. I
tried going through it, but couldn't gather much. Could you please explain
that bit to me ?
Your help is greatly appreciated.
Thanks once again,
Meghna

Meghna Dhar
Computer Science Graduate Student
University of Cincinnati
Phone #(Home) : 513-961-4243

On Mon, 3 Jun 2002, Henrik Nordstrom wrote:

> On Monday 03 June 2002 21:48, Meghna Dhar wrote:
>
> > 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 ?
>
> First the cache_dir is selected.
>
> Then N (the swap file number) is selected.
>
> Finally the namespace of N (0->X) is distributed on the directory
> structure of that cache_dir according to the formula given before..
> (basic modulo, first L2 files in the first L2 directory, the next L2
> files in the next L2 directory, L2 number of L2 directories per L1
> directory, ... (only applies to the "ufs" family of store I/O
> implementations, other implementations map N to locations on the disk
> differently)
>
> The full identity of a swap file is the two integers
>
> a) cache dir number (0-63, as many as you have cache_dir lines in
> squid.conf)
> b) swap file number
>
> This can be regarded as the equivalence of a (device,inode) identity
> number in a standard UNIX filesystem.
>
> The in-memory swap index is the equivalence of a huge single hashed
> directory, covering the whole cache (all configured cache_dir lines,
> plus memory).
>
> Regards
> Henrik
>
Received on Mon Jun 03 2002 - 21:56:45 MDT

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