Re: swap_meta

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 08 Oct 2001 12:45:12 +0200

You are reading the code correctly, and it is quick and dirty.

If we change the layout we need to

  a) If the on-disk layout needs to be changed a new META type needs to
be introduced.

  b) If possible, mappings should be provided between supported memory
and disk formats.

Regards
Henrik

Andres Kroonmaa wrote:
>
> how is saved_object prepended meta header constructed? Via TLV?
>
> #define STORE_HDR_METASIZE (4*sizeof(time_t)+2*sizeof(u_short)+sizeof(size_t))
>
> T = storeSwapTLVAdd(STORE_META_STD, &e->timestamp, STORE_HDR_METASIZE, T);
>
> As I understand it, this makes it pretty dangerous to play with
> _StoreEntry layout. We save 4x timestamps, 2x shorts, and a size.
>
> struct _StoreEntry {
> hash_link hash; /* must be first */
> MemObject *mem_obj;
> RemovalPolicyNode repl;
> time_t timestamp;
> time_t lastref;
> time_t expires;
> time_t lastmod;
> size_t swap_file_sz;
> sfileno swap_filen:25;
> sdirno swap_dirn:7;
> u_short refcount;
> u_short flags;
> u_short lock_count; /* Assume < 65536! */
>
> What are we actually trying to save apart from 4x timestamps?
> sounds like we tried to save refcount and flags soem time ago,
> but now?
>
> ------------------------------------
> Andres Kroonmaa <andre@online.ee>
> CTO, Microlink Online
> Tel: 6501 731, Fax: 6501 725
> Pärnu mnt. 158, Tallinn,
> 11317 Estonia
Received on Mon Oct 08 2001 - 05:13:40 MDT

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