/* public interfaces for block io routines */ #ifndef _BLOCK_H #define _BLOCK_H /*#define IBEX_STATS*/ /* define to get/dump block access stats */ #include <glib.h> /* version of file format */ #define IBEX_VERSION "ibx6" typedef guint32 nameid_t; typedef guint32 blockid_t; #define BLOCK_BITS (8) #define BLOCK_SIZE (1<<BLOCK_BITS) #define CACHE_SIZE 256 /* blocks in disk cache */ /* root block */ struct _root { char version[4]; blockid_t free; /* list of free blocks */ blockid_t roof; /* top of allocated space, everything below is in a free or used list */ blockid_t tail; /* list of 'tail' blocks */ blockid_t words; /* root of words index */ blockid_t names; /* root of names index */ char flags; /* state flags */ /* makes structure fill up to 1024 bytes */ char dummy[1024 - (sizeof(char)*5) - (sizeof(blockid_t)*5)]; }; #define IBEX_ROOT_SYNCF (1<<0) /* file is synced */ /* basic disk structure for (data) blocks */ struct _block { unsigned int next:32-BLOCK_BITS; /* next block */ unsigned int used:BLOCK_BITS; /* number of elements used */ nameid_t bl_data[(BLOCK_SIZE-4)/4]; /* references */ }; /* custom list structure, for a simple/efficient cache */ struct _listnode { struct _listnode *next; struct _listnode *prev; }; struct _list { struct _listnode *head; struct _listnode *tail; struct _listnode *tailpred; }; void ibex_list_new(struct _list *v); struct _listnode *ibex_list_addhead(struct _list *l, struct _listnode *n); struct _listnode *ibex_list_addtail(struct _list *l, struct _listnode *n); struct _listnode *ibex_list_remove(struct _listnode *n); /* in-memory structure for block cache */ struct _memblock { struct _memblock *next; struct _memblock *prev; blockid_t block; int flags; struct _block data; }; #define BLOCK_DIRTY (1<<0) struct _memcache { struct _list nodes; int count; /* nodes in cache */ GHashTable *index; /* blockid->memblock mapping */ int fd; /* file fd */ #ifdef IBEX_STATS GHashTable *stats; #endif struct _root root; /* root block */ /* temporary here */ struct _IBEXWord *words; /* word index */ }; #ifdef IBEX_STATS struct _stat_info { int read; int write; int cache_hit; int cache_miss; }; #endif /* IBEX_STATS */ struct _memcache *ibex_block_cache_open(const char *name, int flags, int mode); void ibex_block_cache_close(struct _memcache *block_cache); void ibex_block_cache_sync(struct _memcache *block_cache); void ibex_block_cache_flush(struct _memcache *block_cache); blockid_t ibex_block_get(struct _memcache *block_cache); void ibex_block_free(struct _memcache *block_cache, blockid_t blockid); void ibex_block_dirty(struct _block *block); struct _block *ibex_block_read(struct _memcache *block_cache, blockid_t blockid); #define block_number(x) ((x)>>BLOCK_BITS) #define block_location(x) ((x)<<BLOCK_BITS) #endif /* ! _BLOCK_H */ ectron4/files/y18n-3.2.2'>dependabot/npm_and_yarn/devel/electron4/files/y18n-3.2.2</option> <option value='dependabot/npm_and_yarn/devel/electron6/files/elliptic-6.5.3'>dependabot/npm_and_yarn/devel/electron6/files/elliptic-6.5.3</option> <option value='dependabot/npm_and_yarn/devel/electron6/files/elliptic-6.5.4'>dependabot/npm_and_yarn/devel/electron6/files/elliptic-6.5.4</option> <option value='dependabot/npm_and_yarn/devel/electron6/files/ini-1.3.8'>dependabot/npm_and_yarn/devel/electron6/files/ini-1.3.8</option> <option value='dependabot/npm_and_yarn/devel/electron6/files/lodash-4.17.19'>dependabot/npm_and_yarn/devel/electron6/files/lodash-4.17.19</option> <option value='dependabot/npm_and_yarn/devel/electron6/files/lodash.merge-4.6.2'>dependabot/npm_and_yarn/devel/electron6/files/lodash.merge-4.6.2</option> <option value='dependabot/npm_and_yarn/devel/electron6/files/node-fetch-2.6.1'>dependabot/npm_and_yarn/devel/electron6/files/node-fetch-2.6.1</option> <option value='dependabot/npm_and_yarn/devel/electron6/files/serve-10.1.2'>dependabot/npm_and_yarn/devel/electron6/files/serve-10.1.2</option> <option value='gnome-3.22'>gnome-3.22</option> <option value='gnome-3.24' selected='selected'>gnome-3.24</option> <option value='gnome-3.26'>gnome-3.26</option> <option value='gnome-3.28'>gnome-3.28</option> <option value='gnome-3.32'>gnome-3.32</option> <option value='gnome-3.36'>gnome-3.36</option> <option value='gstreamer'>gstreamer</option> <option value='gstreamer-1.16'>gstreamer-1.16</option> <option value='gstreamer0.10-removal'>gstreamer0.10-removal</option> <option value='main'>main</option> <option value='master'>master</option> <option value='mate-1.16'>mate-1.16</option> <option value='mate-1.18'>mate-1.18</option> <option value='mate-1.20'>mate-1.20</option> <option value='mate-1.22'>mate-1.22</option> </select> <input type='submit' value='switch'/></form></td></tr> <tr><td class='sub'>FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)</td><td class='sub right'></td></tr></table> <table class='tabs'><tr><td> <a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/about/?h=gnome-3.24'>about</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/?h=gnome-3.24'>summary</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/refs/?h=gnome-3.24'>refs</a><a class='active' href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/dns/whoseip?h=gnome-3.24'>log</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/tree/dns/whoseip?h=gnome-3.24'>tree</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/dns/whoseip?h=gnome-3.24'>commit</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/diff/dns/whoseip?h=gnome-3.24'>diff</a><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/stats/dns/whoseip?h=gnome-3.24'>stats</a></td><td class='form'><form class='right' method='get' action='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/dns/whoseip'> <input type='hidden' name='h' value='gnome-3.24'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/?h=gnome-3.24'>root</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/dns?h=gnome-3.24'>dns</a>/<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/dns/whoseip?h=gnome-3.24'>whoseip</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th></th><th class='left'>Commit message (<a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/log/dns/whoseip?h=gnome-3.24&showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Age</th><th class='left'>Files</th><th class='left'>Lines</th></tr> <tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/dns/whoseip?h=gnome-3.24&id=148314483d3098c0d6a33944f1190842e671502f'>Remove ${PORTSDIR}/ from dependencies, categories d, e, f, and g.</a></td><td>mat</td><td><span title='2016-04-01 22:00:51 +0800'>2016-04-01</span></td><td>1</td><td><span class='deletions'>-2</span>/<span class='insertions'>+2</span></td></tr> <tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/dns/whoseip?h=gnome-3.24&id=fce96910d8fa5a4eed7867a15f95ee514b0fdc2e'>Make it so that the default Perl is always called perl5.</a></td><td>mat</td><td><span title='2015-09-14 20:19:48 +0800'>2015-09-14</span></td><td>1</td><td><span class='deletions'>-1</span>/<span class='insertions'>+1</span></td></tr> <tr><td class='commitgraph'>* </td><td><a href='/~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/dns/whoseip?h=gnome-3.24&id=0ae61b68184f04567df902d2ba70310dbe2bcb10'>Reduce the difference with other dnstools ports: provide fallback download</a></td><td>danfe</td><td><span title='2015-08-06 17:10:56 +0800'>2015-08-06</span></td><td>2</td><td><span class='deletions'>-2</span>/<span class='insertions'>+6</span></td></tr>