]> git.ipfire.org Git - thirdparty/squid.git/commit
* Removed old Rock Store hack to update swap_file_sz before it is packed into
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 15 Feb 2011 04:09:58 +0000 (21:09 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 15 Feb 2011 04:09:58 +0000 (21:09 -0700)
commitc728b6f9fff43c9e8a2c4af5bf4916dcb4c36fa9
treeb728a1d79d83582c593d129273964c1948d68f0f
parentaa1a691ec62c31bd0aa3d1c46a1bf83e16cd280c
* Removed old Rock Store hack to update swap_file_sz before it is packed into
store entry disk "header". Prepend our own disk to each db cell. Eventually,
the same header may be used to store "next page" or other info.

Modern Squid code should not use packed swap_file_sz or object_sz because
neither can be unknown at the packing time.  The storage code should either
record its own size information (Rock Store does that now) or rely on
3rd-party metadata (UFS uses fstat(2) system call).

* Do not promise to read a being-written entry. Use peekAtReader() to check
that we can read the presumably locked (by us) entry.

It is probably possible to queue a reader somehow and wait for the entry to
become readable or even to read initial pages as we write (when we start doing
incremental writing) but it would be rather complex and expensive to
synchronize such shared read/write access across workers.

* Fixed ::StoreIOState::offset_ Rock maintenance. The old code probably
misinterpret offset_ meaning and kept the disk offset there. It should have
been just the distance from the beginning of the db cell (not db file)
instead. It probably worked because we write everything at once and the
offset_ values were usually big enough to pass "wrote everything" checks.

* Extracted storeRebuildParseEntry from storeRebuildLoadEntry.

This allows Rock Store to analyze and skip disk cell header before giving
the packed store entry info to the common core code.

* Report more disk stats. Needs more work, especially in SMP reporting case.
Map stats are only reported for tiny maps because scanning the entire map may
be too expensive for bigger maps (is it worth the overhead to maintain these
stats all the time instead of computing them from scratch on-demand?).

* Moved StoreEntryBasics into Rock namespace.

* Be more consistent in setting Rock::IoState's swap_filen, swap_dirn,
diskOffset, and payloadEnd.

* Renamed vague (and confusing after the header was added to the db cell)
entrySize to more specific payloadEnd.

* Synced with r11228 changes (making Store work with SMP-shared max-size
cache_dirs).
src/fs/rock/RockDirMap.cc
src/fs/rock/RockDirMap.h
src/fs/rock/RockFile.h
src/fs/rock/RockIoState.cc
src/fs/rock/RockIoState.h
src/fs/rock/RockRebuild.cc
src/fs/rock/RockSwapDir.cc
src/fs/rock/RockSwapDir.h