fellow_cache: Comment on struct fellow_cache_obj

parent 3759055d
......@@ -708,10 +708,11 @@ enum seglistload_state {
struct fellow_cache_obj {
unsigned magic;
#define FELLOW_CACHE_OBJ_MAGIC 0x837d555f
// protected by fco mtx (in fcs)
enum fcol_state logstate;
enum seglistload_state seglstate;
// ^^^ protected by mtx - do not add <64bit values
struct fellow_cache_lru *lru;
uint64_t ntouched;
......@@ -723,7 +724,7 @@ struct fellow_cache_obj {
struct objcore *oc;
fellow_disk_block fdb;
fellow_disk_block fdb; // *1) below
VRBT_ENTRY(fellow_cache_obj) fdb_entry;
struct fellow_cache_seg fdo_fcs;
......@@ -735,6 +736,12 @@ struct fellow_cache_obj {
struct fellow_cache_seglist fcsl_embed;
};
/* comments on the above:
*
* *1) this is redundant to region_fdb(&fdo->fdo_fds.seg) an is duplicated here
* for efficiency of the fdb lookup (see fco_cmp())
*/
/*
* we write fellow_disk_object(s) with the embedded fellow_disk_seglist such
* that, when reading the object, the fcsl_embed can hold all of the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment