bdcd91c28c0f5269d8971b9f5ec5d68f7155492a |
|
08-Feb-2018 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix assert-crash with lock_method=dotlock
The dotlock wasn't deleted in all code paths. Fix this by simplifying
the unlocking to be done the same way with and without dotlock.
Fixes:
Panic: file mail-cache.c: line 624 (mail_cache_lock_file): assertion failed: (cache->dotlock == NULL) |
5109f00ce0cf7c89be9ab20a488a93a59212ff2e |
|
31-Jan-2018 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on file_lock_free(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- file_lock_free(&E);
- }
+ file_lock_free(&E); |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
2608ab4495148a9362e75ec5c67dcbdec92dbae2 |
|
20-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_cache_open_or_create_path()
This allows moving cache file to another directory. |
67bbcd664bebce9a507a49c67273be4814d07c97 |
|
12-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_index_cache_optimization_settings |
6307d76096764e66bddc63d4a3e5a1aa19cc528f |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on buffer_free(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- buffer_free(&E);
- }
+ buffer_free(&E); |
846624bdec0d5deec6cf22071158221391ec5f2d |
|
11-May-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-index: Add mail_cache_set_seq_corrupted_reason
Marks a seq in cache corrupted, and removes
that instead of the whole cache. |
211c638d81d382517d196ad47565e0d85012c927 |
|
19-Feb-2017 |
klemens <ka7@github.com> |
spelling fixes |
7707c4b35b868eda75b585c863d97726ff23f80f |
|
14-Feb-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-index: zero mmap_length after logging error
Logging that mmap(size=0) failed looks suspicious. |
0b2c958d1cdcbeb46c2ce7ada0917b304ad89dc1 |
|
26-Jan-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Don't log error on dovecot.index.cache delete if it doesn't exist
For example if a cache is marked as corrupted and there is no cache, it's
not really an error that it doesn't exist.
Fixes:
Error: unlink(.../dovecot.index.cache) failed: No such file or directory (in mail-cache.c:29) |
fafa6393128960c70a9979af1c23cea41027fdd1 |
|
18-Jan-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
index: don't try to unlink in-memory cache file
Avoid these errors:
Error: unlink((in-memory index).cache) failed: No such file or directory (in mail-cache.c:29) |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
044b0557e92ae0bb3b25af49d5468bad3d17db43 |
|
23-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix checking if cache file becomes >4GB |
17018da24e7dbb419c5047c316caadcb2fc5364a |
|
15-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Use file_cache_new_path() for dovecot.index.cache |
e9594e86dc601b72c1636f2b901dcfbf4ffaf47f |
|
21-Nov-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-index: Limit mmap errors in index cache to 1/s |
6ade0d76250bc7db405cd20f3e1b660f74c77bd4 |
|
18-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: If mmap() fails, include the attempted size in the error. |
f330b7d9e14255fc06bc82908d9bc5a12cccb424 |
|
20-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: If opening a cache file fails, try again later.
The previous code would never retry opening the cache file within the same
session. |
46d91e9ea8bf41e56c5436c064372171c5876d81 |
|
20-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fixed calling mail_cache_open_and_verify() on an already open cache.
This was done at least by index_index_rebuild_init().
Either the currently open cache->fd was leaked, or if the cache file open()
failed we left the cache in an inconsistent state where cache->fd == -1, but
cache->hdr != NULL, so it caused MAIL_CACHE_IS_UNUSABLE() to also be TRUE. This
could have ended up in an assert:
Panic: file mail-index-lock.c: line 31 (mail_index_lock_fd): assertion failed: (MAIL_INDEX_IS_IN_MEMORY(index)) |
5bd1c1d4fe3265d5e6b6054044fd6d78e42c9d0a |
|
02-Mar-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: After MAIL_INDEX_OPEN_FLAG_SAVEONLY access cache's read_buf wasn't always reset.
This could have caused at least errors like:
Corrupted index cache file .../dovecot.index.cache: File too small
I'm not sure if it might have also returned stale data sometimes.
Easy way to reproduce this bug was:
imaptest copy=100 copybox=Trash &
imaptest box=Trash append=0 |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
46b823ac3bce2c0f9f0fc73911e48d3a77b04fbe |
|
08-Sep-2015 |
Timo Sirainen <tss@iki.fi> |
Replaced unlink() calls with i_unlink*() wherever possible. |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
425cbcea60cf689b0069698c83f8bdc474d70693 |
|
07-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed assert-crash in some cache locking race conditions.
If mail_index_map() is being called, we can't refresh the index or it'll
crash. It wouldn't help anyway, since the index was just refreshed. |
ab70f55bb8d824ca1ed7c74196f2f502edd29cc7 |
|
07-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: mail_cache_lock() partial rewrite.
require_same_reset_id is no longer needed, if it ever was. If we're locking
the cache file, we always want the latest one. The logic of locking in
general was somewhat confusing and it probably didn't always successfully
lock when it should have, because the reset_id happened to match an old
file. |
620b5ed41650da63b0ba15c489f9f312231d5d9b |
|
07-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Code cleanup - avoid code duplication. |
e4b242684975b4d3702ca79bfd56452fe139a2bf |
|
07-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed cache file creation race condition.
If two processes are creating the index files at the same time, don't have
one of them delete the dovecot.index.cache that the other one just created.
This means we never should be calling mail_cache_create(), so it was removed
entirely. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
4f7fea346ca3ab31fc1f421dc179a540663b1450 |
|
06-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Avoid assert-crashing later if mmap(dovecot.index.cache) fails. |
97144a346898fb62f9fae44fa5c076986553c66b |
|
04-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Bug in cache file size verification caused the whole cache file to be mapped. |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
b14bdce468df7d98afb3e5e8c71b74a75cad2453 |
|
29-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed invalidating buffered cache file with map_with_read. |
9bd08aa09ea0cbd7b221aae9fc0534eb762d3de6 |
|
22-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixes to handling broken cache records that point outside file.
Especially try to avoid failing by trying to allocate gigabytes of memory. |
de9b2ee7878a73346ba0eee34798abb22ffcfcb6 |
|
19-Dec-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: If map_with_read gets disabled, reset the cache buffers properly. |
dad1d7b721e80a7e6c0282ace93aef86312fa579 |
|
18-Dec-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: MAIL_INDEX_OPEN_FLAG_SAVEONLY was buggy when reading data near end of dovecot.index.cache.
We assumed that we read as much as we requested, even if the file was
smaller. |
9af06b76539445d2d84d6e1bcb91685b6abeb4e0 |
|
28-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed assert-crash caused by recent cache file changes. |
122ee3c9e8cf7f51c323204626970c314a32df05 |
|
28-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed memory leak with MAIL_INDEX_OPEN_FLAG_SAVEONLY |
bba52ecbb0cfb6585f1a4ff29695dd2d27af98d2 |
|
04-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: MAIL_INDEX_OPEN_FLAG_SAVEONLY may have caused stale data to be read from cache. |
f0ff961282e618945dfe997dc45ff95d656e5790 |
|
03-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Replaced cache's deleted_space with deleted_record_count.
This way when expunging messages we don't need to actually read through the
cache file and calculate how many bytes will be freed, we can simply
increase the deleted_record_count by 1. We'll still compress the cache file
approximately after 20% of the space (records) has been deleted.
This also converts the old "hole offset" header field to tracking the number
of records in the cache file. Otherwise we'd have to assume that all of the
messages in mailbox have a cache record, but that isn't true for users who
have only temporary cache fields. This "hole offset" cannot be trusted
completely, because nothing prevents old Dovecot version from simply writing
a hole offset there and messing up the record counts. Because of this there
are a couple of extra sanity checks for it. (Unfortunately there wasn't any
easy way to simply add a new field to header without breaking backwards
compatibility.) |
920b9f0fdfa5a5d7763e05736601a31bcb291a53 |
|
03-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added minor version to dovecot.index.cache file header. |
131b073bdc3650083b00616dc778dd3017c2bbb5 |
|
03-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Cache record linking is now while writing new records, not later with pwrite().
This should make performance somewhat better. It also means that now the
only overwrites to cache file are to the file header and the fields header.
This means that we no longer have to invalidate file_cache (with
mmap_disable=yes) except when reading the headers, which is always done
anyway.
It would be nice to move the overwritten fields in the headers to a cache
header in dovecot.index file, but this is a bit tricky currently. When
writing these headers the cache file needs to be locked to avoid race
conditions. To avoid deadlocks the transaction log would have to be locked
before the cache. The code to do all this would still be a bit complex, and
to keep backwards compatibility with old Dovecot versions it would still
have to do the overwriting until the backwards compatibility code is
disabled. |
600848916ea123b89235bb51d660f662f2670538 |
|
03-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Recent cache file changes broke writing. |
c028c93338799bd7053deac3d553896083cb5858 |
|
03-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Recent cache file changes broke writing. |
ab1e5b156d1b5480d36ed6e8e06197339d803038 |
|
26-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Optimize cache file reads with MAIL_INDEX_OPEN_FLAG_SAVEONLY |
f81801789c71f64a2fc3c44d09f9864bbc68cd45 |
|
26-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: After recent cache changes, cache was often wrongly being thought of as unusable |
bb86f8f22f2561438ce710d2113f04a4d0082b50 |
|
18-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Crashfix for MAIL_INDEX_OPEN_FLAG_SAVEONLY change. |
18d92dbbb752c79dc461514e52f7ef11847e636b |
|
18-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added MAIL_INDEX_OPEN_FLAG_SAVEONLY to do only minimal reads from cache file. |
8ac66221e8fdc2c5523cff1893e0d1c5de25fa49 |
|
18-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Code cleanup: Removed mail_cache.data |
82ed69779f49bd71ef1b570ce8aca67d357dbee8 |
|
18-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: mail_cache_map() API cleanup |
289064eb21595d3e4460439eccdc48232d13f5e1 |
|
04-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Simplified writing to dovecot.index.cache file.
The old method was basically:
- write max. 32 kB to internal buffer
- flush it by writing to reserved areas (with no locks)
The reserved areas were acquired by doing (whenever needed):
- lock dovecot.index.cache
- reserve data from dovecot.index.cache for writing, potentially increasing
the file size by writing 0 bytes. the reserved area size varies.
- unlock dovecot.index.cache
This worked, but if multiple processes were writing to the cache file it
could have left incomplete reserved areas as holes. The holes were attempted
to be filled if they were large enough.
The new method is:
- write max. 256 kB to internal buffer
- lock dovecot.index.cache
- append the buffer to dovecot.index.cache
- unlock dovecot.index.cache
No reserved areas, holes or anything else weird going on.
Ideally no data would be overwritten in the dovecot.index.cache file, only
appended. Unfortunately currently some data is still overwritten:
- mail_cache_header.{deleted_space,continued_record_count}
- mail_cache_header_fields.next_offset when writing a new one
- mail_cache_header_fields.{last_used,decision}
- mail_cache_record.prev_offset
The changing headers could eventually be moved to dovecot.index. This
however is a backwards-incompatible change. The record's prev_offset could
maybe simply just not be written in those (somewhat rare) problematic
situations. |
678d0463849ba777106eb7875f27db07a5d8e3df |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Hash table API is now (mostly) type safe. |
7536dca18968a279b69c685eedda205bee228fd4 |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
hash_table_create(): Removed table_pool parameter.
Every single caller was using default_pool there, so there's no point in
having it. |
e34d170f8f0e084bd94bfbc1a7085ece67e508df |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Make sure we check all the functions' return values. Minor API changes to simplify this.
Checked using a patched clang that adds attribute(warn_unused_result) to all
functions. This commit fixes several error handling mistakes. |
6cb2c6ecddcdbeac9e6c73a292244747e12a793e |
|
24-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Added file_dotlock_delete_verified() and changed file_dotlock_delete() to return void. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
0b878c6a17c608fcd8b52a5762ed2c6a5cf4700a |
|
08-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Increase initial memory pool sizes. |
128ea07dab8d67124ea74bcc085a478784b6358a |
|
30-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: Changed mail_cache_view_close() API to take pointer-to-pointer. |
f3976df875193529127d584cb713983e8160bdcf |
|
31-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added mail_cache_exists() |
ad6fe4a3c0d589bb2db5238e0a6418f8d863b3c2 |
|
30-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added mail_cache_view_update_cache_decisions() |
8fa86f7ef06aa6cf0239c7ca2eb98889691d40d4 |
|
30-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added mail_cache_view_update_cache_decisions() |
85da8c055280cd45553b6b335e9fb226d6e2801e |
|
08-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
Linux NFS: fstat() may return ENOENT instead of ESTALE in some kernel versions. |
2e37d45867d081db150ab78dad303b9077aea24f |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
183bea41fa640dc8117f3eb45ff935cd81377a84 |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
d35fee8d1e5e31614dba5e64d45ed23c7d6bfa53 |
|
12-Aug-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added mail_cache_reset(). |
b780aa272b742a43579cdb523cc79cc8d4521306 |
|
25-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
Renamed fsync_disable to mail_fsync=optimized|always|never.
--HG--
branch : HEAD |
036626b19f14bef582f96e556913ae91b1d67881 |
|
23-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
Added mail_max_lock_timeout setting.
This could be useful inside lda/lmtp protocol sections to avoid them from
spending too much time waiting for locks, since they can easily just
return "try again later".
--HG--
branch : HEAD |
1c0590b2729567ad60dafde4d2c5f19635755a3d |
|
31-May-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: If index is read-only, always fail when trying to lock cache file.
--HG--
branch : HEAD |
e8fd7988ec183fb6c104aed19a61f1a096c51d34 |
|
09-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed logging file creation EACCES failures.
--HG--
branch : HEAD |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--HG--
branch : HEAD |
6bc0f424bcdb9119d8159874cf98adfa53eefd9a |
|
09-Oct-2009 |
Timo Sirainen <tss@iki.fi> |
lib-index: Take MAIL_INDEX_OPEN_FLAG_READONLY more seriously.
Don't do any filesystem changes to the index when it's set, even if
corrupted index files are detected.
--HG--
branch : HEAD |
66ecc94150cbce23aad3240135e0782e0a74d479 |
|
30-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
index: Removed duplication of mail_index_open_flags from struct mail_index.
--HG--
branch : HEAD |
ef5fb27361cc5e15766e85e28355750ff04b13c9 |
|
23-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
dbox: Make sure indexes are never moved to memory (in case of out-of-disk space).
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--HG--
branch : HEAD |
3ccab0bac68040f179a7de45c516cec258e28fdb |
|
19-Dec-2008 |
Timo Sirainen <tss@iki.fi> |
Renamed hash_*() to hash_table_*() to avoid conflicts with OSX's strhash.h
Based on patch by Apple.
--HG--
branch : HEAD |
25c22e54d1071d120641e9eecd0023e7373e65ff |
|
18-Oct-2008 |
Timo Sirainen <tss@iki.fi> |
Fixes to handling "out of disk space/quota" write failures.
--HG--
branch : HEAD |
763f83d3cc47bce05cbc396419c4db2b71dd8e68 |
|
11-Sep-2008 |
Timo Sirainen <tss@iki.fi> |
Mail cache: If locking failed, the next time try to lock it only once.
Also increased the first timeout to 10 seconds.
--HG--
branch : HEAD |
4aae8acbcfa9cac96b4af39bfabcbe569e804827 |
|
11-Sep-2008 |
Timo Sirainen <tss@iki.fi> |
Mail cache: Don't warn if dotlocking fails due to timeout (non-dotlocking already didn't).
--HG--
branch : HEAD |
d0bbbc7057aa33b52ee378196dee7d773437468f |
|
11-Sep-2008 |
Timo Sirainen <tss@iki.fi> |
Mail cache compression: If we can't get lock immediately, do it later.
--HG--
branch : HEAD |
5724e7103eed12fe36b55a7b5a8653284a2184b9 |
|
11-Sep-2008 |
Timo Sirainen <tss@iki.fi> |
Mail cache: lock_method=dotlock could have caused a process to deadlock with itself.
--HG--
branch : HEAD |
52d89203ef9f49f9b838d4b8625e3044fad9835b |
|
09-Sep-2008 |
Timo Sirainen <tss@iki.fi> |
Mail cache file: Fix to previous locking changes.
--HG--
branch : HEAD |
84da9c6d6e162b064608cbfa9a47e0d60553c593 |
|
09-Sep-2008 |
Timo Sirainen <tss@iki.fi> |
mail_cache_lock(): Return -1 if locking times out.
This fixes cache compression starting even when locking timed out.
--HG--
branch : HEAD |
f4dec9c5c5585405659af45a1d6f3b549955d1f9 |
|
06-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Catch dotlock creation timeout error.
--HG--
branch : HEAD |
0415a309aea15e0326c2615d428333a716fb717e |
|
06-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Catch dotlock creation timeout error.
--HG--
branch : HEAD |
d6693dac50e4fb547d8dc61b85820f1761a33575 |
|
02-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Optimized cache record loop tracking.
--HG--
branch : HEAD |
ba8bdb9dfc467ed2e6a988c42567fc44a28bebfc |
|
02-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Optimized cache record loop tracking.
--HG--
branch : HEAD |
19e8adccba16ff419f5675b1575358c2956dce83 |
|
11-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
Renamed T_FRAME_BEGIN/END to T_BEGIN/END. Removed T_FRAME() macro and
replaced them with T_BEGIN/END calls. T_FRAME() made it difficult to debug
code with gdb.
--HG--
branch : HEAD |
85ebd164b748fbd808fcfc17c8fd2af4cd9289d5 |
|
31-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
If cache file's version/architecture/indexid changed, make sure the file
gets unlinked so it gets rebuilt.
--HG--
branch : HEAD |
76b43e4417bab52e913da39b5f5bc2a130d3f149 |
|
01-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2008.
--HG--
branch : HEAD |
eddd9bf1a1369aea4a2715f6be1137da6d17d293 |
|
05-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced t_push/t_pop calls with T_FRAME*() macros.
--HG--
branch : HEAD |
04b8a90af181cc4c7959266855e8ed50a22ed413 |
|
25-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
NFS cache flushing updates.
--HG--
branch : HEAD |
956f7778e413d3184d69e7b96e4a6b3cd5570bcd |
|
22-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
mail_cache_field_want_add(): Return TRUE for temp fields only if we're
adding the field to a new enough message.
--HG--
branch : HEAD |
dc0474dc9d5652d76cb41f439844dd80c8b96642 |
|
18-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
If cache file's file_seq appears to be broken, handle it by compressing the
cache instead of just never using it.
--HG--
branch : HEAD |
bc564f1d3d953cf724828322b11ae89e0f59ffc9 |
|
18-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
NFS cache flushing APIs changed and backend implements it a bit differently.
Hopefully this works now more correctly.
--HG--
branch : HEAD |
21886e64a7a45a3bdd029e3b3421d22f69f3d7b5 |
|
18-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Don't bother flushing attribute cache if we just fcntl locked the file.
--HG--
branch : HEAD |
4ee5b0b6c14f1f839e54e9d2c13a3c151e8caec0 |
|
16-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
nfs_flush_attr_cache() doesn't take flush_dir paramter anymore. Instead the
directory is always flushed now.
--HG--
branch : HEAD |
2131ef7a3390f15ea6a958256ea54908f1096350 |
|
16-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Fixed cache file's NFS attribute cache flushing.
--HG--
branch : HEAD |
5bdad39213d28ab35e615a7f4ea1712ab25b6a80 |
|
11-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Added missing error logging for file_dotlock_create/open calls.
--HG--
branch : HEAD |
e6e43b396799aa5704c679a3017d6c7195f9347d |
|
06-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Fix to last change
--HG--
branch : HEAD |
cf3bea6d9b57f8608bec22d98ad547a507b05f66 |
|
06-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Code cleanup
--HG--
branch : HEAD |
6e235046e1d8e9d89fc948f5c623676c20421a28 |
|
06-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
When reading the latest fields, begin finding the fields from the last known
header instead of from the beginning.
--HG--
branch : HEAD |
f501ad38c51cf1d8f4f84313922c785e6ae6e81f |
|
06-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Keep a separate copy of mail_cache_header when mmap_disable=yes, otherwise
it could get cleared unexpectedly.
--HG--
branch : HEAD |
b64b0ea05d8618cfb83da76c531f77b57b25e37a |
|
06-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
If cache file header is corrupted, keep hdr=NULL so cache file isn't tried
to be used.
--HG--
branch : HEAD |
69e03a846f6980144aa75bff0590c04852bffbbc |
|
06-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
mail_cache_reopen(): Don't bother reopening if file is still the same.
--HG--
branch : HEAD |
3b20a37cb65c70f55e48dbdc912313fdacdab630 |
|
06-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
mmap_disable=yes: Don't flush NFS caches if mail_nfs_index=no.
--HG--
branch : HEAD |
c53e8ee216904ffe6de4f6518d9f9f5107b7610e |
|
04-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Added MAIL_INDEX_OPEN_FLAG_READONLY.
--HG--
branch : HEAD |
8da095519878426b012058e6f331a669f327f47f |
|
21-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
dotlocks: Flush NFS attribute cache only if nfs_flush setting is TRUE.
--HG--
branch : HEAD |
6f73af3a3a6ee900c7e736874587968d76a20bc0 |
|
22-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
mail_cache_transaction_commit()/rollback() API is now public and takes a **
pointer. Don't break if transaction is committed/rollbacked multiple times
for a cache view.
--HG--
branch : HEAD |
89a126810703c666309310d0f3189e9834d70b5b |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced my Copyright notices. The year range always ends with 2007 now.
My name was replaced with "Dovecot authors". In many cases I didn't really
even own the copyright, so this is more correct.
--HG--
branch : HEAD |
648d24583c1574441c4fa0331a90bd4d6e7996c5 |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
pool_unref() now takes ** pointer.
--HG--
branch : HEAD |
ba00293b85c7fb4e7a2d100991c716e17b9daaae |
|
15-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
hash_destroy() and hash_iterate_deinit() now take ** pointer.
--HG--
branch : HEAD |
0f66f12eb4cdbf47670975044c88d8f388bf92df |
|
15-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Changed buffer_free() and buffer_free_without_data() APIs to take ** pointer
which is set to NULL instead of hiding it with a macro.
--HG--
branch : HEAD |
c4877db8b6559846f4b58be8e42422dc734c193f |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Don't bother complaining about indexid changes. The real reason for the
change was most likely logged already, and the "indexid changed" error just
confuses people.
--HG--
branch : HEAD |
cc833a7a4e2258afdc834ace4bfe6579820a1df3 |
|
09-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced MAIL_INDEX_LOCK_SECS usage with cache/index/log specific defines
which are common with dotlocks.
--HG--
branch : HEAD |
3697080532ccd9f51fac108be6079b616c7a2ddf |
|
03-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Created a new struct mail_index_record_map which can be shared by multiple
mail_index_maps. This avoids having to copy records when appending new
messages.
--HG--
branch : HEAD |
5196f9ea42d02000f9c3d22f20aa816140af4422 |
|
02-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
If index is in memory, don't try to unlink() cache file.
--HG--
branch : HEAD |
51b979b6414b940f04677a7e2d064be119345954 |
|
12-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Flush NFS caches when needed if MAIL_INDEX_OPEN_FLAG_NFS_FLUSH is enabled.
--HG--
branch : HEAD |
df6478c4cf605bd81b3891c148b84c14eb6c4035 |
|
12-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Don't create cache file until something is actually being added to it.
--HG--
branch : HEAD |
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4 |
|
14-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Changed mail_cache_foreach() to be an iterator: mail_cache_lookup_iter_*()
--HG--
branch : HEAD |
1b97a59edb073e9a89ac43a21a9abe5d590d4a56 |
|
14-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Cache code cleanups
--HG--
branch : HEAD |
ce19e80b5a907d51a7cdf081e09699af8367dbfa |
|
16-May-2007 |
Timo Sirainen <tss@iki.fi> |
Removed mmap_no_write setting. The only OS requiring it is OpenBSD, so we're
now forcing mmap_disable=yes with it instead. dovecot.index.cache file is
the most important file to mmap(), but since this didn't work with
mmap_no_write, there's not much point in keeping special code paths for
minimal gains.
--HG--
branch : HEAD |
2f29162743a78434cb38fa1566bbc1e1836c3d8f |
|
15-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Error handling crashfix
--HG--
branch : HEAD |
abe7afb8f1766fbcef1b9df513109e43d7d16e49 |
|
15-Feb-2007 |
Timo Sirainen <tss@iki.fi> |
Allocate cache file's size amount of memory for the file cache so it doesn't
have to grow it constantly while reading the file.
--HG--
branch : HEAD |
8b9342aa96b2f297e23afb261f9f7dd859800952 |
|
16-Jan-2007 |
Timo Sirainen <tss@iki.fi> |
Make sure file_seq isn't zero in cache file header.
--HG--
branch : HEAD |
8887bf3757d51d73887dd20b1db3334d867d3817 |
|
28-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Added dotlock_use_excl setting.
--HG--
branch : HEAD |
1a21e7049796c98d6d998fcf7a438d7a97193dc4 |
|
20-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Prefix COMPRESS_* defines with MAIL_CACHE_.
--HG--
branch : HEAD |
59151b71059df1190acd75d8717ed04a7920c862 |
|
15-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Added context parameter type safety checks for most callback APIs.
--HG--
branch : HEAD |
d9fdacd5fb3e07997e5c389739d2054f0c8441d8 |
|
06-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Lock handling changes. Everything goes through file-lock API now and there's
only a single enum listing the different lock methods. This change exposed
some unneeded (or possibly even wrong?) unlock calls in index file handling
which were fixed.
--HG--
branch : HEAD |
e192a3b1ca8ae857e7d87298ea507d32977ba570 |
|
13-Oct-2006 |
Timo Sirainen <tss@iki.fi> |
Don't use time_t anymore in cache file. uint32_t is large enough and makes
cache files compatible between 32bit and 64bit systems.
--HG--
branch : HEAD |
6a8a4c9f530668cd8961b73d702856ed94f05f80 |
|
13-Oct-2006 |
Timo Sirainen <tss@iki.fi> |
Delay opening the cache file until it's actually needed.
--HG--
branch : HEAD |
e86b83c55ddf63d702f75c8909d3a571cfa6d12d |
|
13-Oct-2006 |
Timo Sirainen <tss@iki.fi> |
If time_t or uoff_t size had changed, we returned -1 instead of FALSE, which
broke the check later..
--HG--
branch : HEAD |
91dca97b367c54a139c268b56a0c67f564bd9197 |
|
10-Sep-2006 |
Timo Sirainen <tss@iki.fi> |
Replaced ARRAY_CREATE() macro with [ipt]_array_init() macros. The macro
has no side effects so it might as well be lowercased.
--HG--
branch : HEAD |
26a8b7deb3a5b6f26f9c4d71538e1248f680e4be |
|
10-Sep-2006 |
Timo Sirainen <tss@iki.fi> |
Removed type parameter from ARRAY_CREATE since it's not needed anymore.
--HG--
branch : HEAD |
da985034a708db2f61394b30d117050ae6829ee5 |
|
11-Jul-2006 |
Timo Sirainen <tss@iki.fi> |
Added support for calling expunge handler for an extension even if the
extension isn't used in the opened index file. Added context-parameter to
the callback function. If the function returns -1, the sync is failed.
--HG--
branch : HEAD |
f519e4c2ad4ef826f1b08f3e0138b9b287a52c80 |
|
08-Jun-2006 |
Timo Sirainen <tss@iki.fi> |
Crashfix
--HG--
branch : HEAD |
9315dd69233d554452df0c12bc57002d2042a8f4 |
|
30-May-2006 |
Timo Sirainen <tss@iki.fi> |
We were updating index->map also when syncing views.
--HG--
branch : HEAD |
58be9d6bcc3800f5b3d76a064ee767fbe31a5a8a |
|
03-May-2006 |
Timo Sirainen <tss@iki.fi> |
Don't compress cache file if it was just compressed by another process.
--HG--
branch : HEAD |
1e47cfede3a0b62654105daab00e97b5d660bc6b |
|
16-Feb-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Try to handle ESTALE NFS errors the best way we can.
--HG--
branch : HEAD |
8ecbb74bc4c7f6f6145da3525941d1d0e20e67f1 |
|
05-Feb-2006 |
Timo Sirainen <tss@iki.fi> |
Removed immediate_stale_timeout and changed the stale_timeout behavior to
check both dotlock and the file it protects, and overwrite the lock file
whenever neither of them have been modified for stale_timeout seconds (ie.
also immediately if their timestamps are old enough).
--HG--
branch : HEAD |
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5d |
|
14-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.
--HG--
branch : HEAD |
6ef7e31619edfaa17ed044b45861d106a86191ef |
|
13-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Added "bool" type and changed all ints that were used as booleans to bool.
--HG--
branch : HEAD |
0d0451206a91e9f96e522075dce28a89adc2325d |
|
07-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Beginnings of fallbacking to in-memory indexes when write fails with "out of
disk space" error.
--HG--
branch : HEAD |
811f2e26d9782d9cb99fdf82e18ffa0a77564fe2 |
|
06-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Moved uoff_t and time_t compatibility checks to cache file, since they're
not needed for index/log. Only index file incompatibility check is now
endianess flag.
--HG--
branch : HEAD |
a817fdcc43aedf423e2134091d5f83f91d64bcc9 |
|
30-Sep-2005 |
Timo Sirainen <tss@iki.fi> |
Unlocking cache file can also corrupt it since it modifies it. Added a
return value for it and checks to handle the failure. Fixes a crash in some
error situations.
--HG--
branch : HEAD |
75e368ecf19e16a4f590e103d0c80327b57cff18 |
|
27-Aug-2005 |
Timo Sirainen <tss@iki.fi> |
Don't try refresh index file while locking it. It just slows down things,
is rarely useful and may break sometimes with mmap_disable=yes. Also we were
calling it after mail_index_view_open() so it wasn't even working..
--HG--
branch : HEAD |
16f816d3f3c32ae3351834253f52ddd0212bcbf3 |
|
04-Jul-2005 |
Timo Sirainen <tss@iki.fi> |
Moved array declaration to array-decl.h and include it in lib.h. So array.h
needs to be now included to use any array_*() functions.
--HG--
branch : HEAD |
9566c1b4506d49778659e3dc65997f3c0399cb7e |
|
14-May-2005 |
Timo Sirainen <tss@iki.fi> |
Pointers into file cache may change as a result of file_cache_write().
--HG--
branch : HEAD |
dbd9604da561399cc6255289d5b6f6f662ab2d00 |
|
14-May-2005 |
Timo Sirainen <tss@iki.fi> |
Whenever writing to cache file, also updated file_cache. Fixes problems with
mmap_disable=yes.
--HG--
branch : HEAD |
a835194f9a9dae88528367a791cbc282589f6c01 |
|
23-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
s/PREFIX/SUFFIX/ for .cache and .log filename suffixes..
--HG--
branch : HEAD |
7981779f9aebd25728d3c26555d598ff842cf2e2 |
|
08-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
Don't crash at mail_cache_lock() if mail_cache_map() fails.
--HG--
branch : HEAD |
4b231ca0bbe3b536acbd350101e183441ce0247a |
|
29-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
In-memory indexes work again. Just pass dir as NULL to mail_index_alloc().
--HG--
branch : HEAD |
519e0a461271843833a2b42626ad93f6e7ddc497 |
|
24-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Added sync/sync_lost/expunge handler unregistering, and also do that. Fixes
crash with mmap_disable=yes when reopening mailbox.
--HG--
branch : HEAD |
287ba82a8da3eaa473b5735d4eeac2fb4c5d8117 |
|
12-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Changed many buffers to arrays. Cleans up the code a lot.
--HG--
branch : HEAD |
f239eb76f77afcbc0bfc97c9b52b4407d1bc3fe6 |
|
31-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
Don't complain about cache indexid changing when recreating index.
--HG--
branch : HEAD |
13c6532dc104d23061e6901783ceb1ff8872c206 |
|
16-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
Changed dotlocking API.
--HG--
branch : HEAD |
ad850190d946d34966a56838cfdb216e021b5b5f |
|
16-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
When we detect cache corruption, just mark the cache as unusable instead of
immediately closing the file and unmapping. It's too difficult to keep track
of all the possible ways in which that can break and cause "bad file
descriptor" errors and maybe crashes..
--HG--
branch : HEAD |
2af769daebd83719ac696a440e06f6020471cec0 |
|
05-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
lock_method=dotlock doesn't crash anymore while trying to modify cache file.
We didn't previously deal with any fatal errors that fcntl/flock locking
could have given but assumed that the locking succeeded.
--HG--
branch : HEAD |
d30da25fb6be1f1c667d93767c9194000194b618 |
|
05-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Renamed mail_index_refresh() to mail_index_reopen_if_needed(). Added public
mail_index_refresh() which makes sure index is fully refreshed at the time.
Added mbox code to call it after mbox is locked to avoid using old mbox offsets.
--HG--
branch : HEAD |
f23298fea47eecbeded985ee2537a34c4c4ef56b |
|
05-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Added "sync lost" handlers which are called with mmap_disable=yes when index
file is re-read without going through all of the transaction log.
--HG--
branch : HEAD |
6fdf8b5e4e71a69f5974f59eec2b8c19bc421fe2 |
|
04-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Locking fixes and cleanups
--HG--
branch : HEAD |
62cfc346eb7b0a4fd9e1ab6edd63b98711161229 |
|
29-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Don't write to closed cache file
--HG--
branch : HEAD |
69bd816e46fdee6182d0cb2e4c6be32399a555c8 |
|
29-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Cache sync handler wasn't registered correctly so it broke with
mmap_disable=yes.
--HG--
branch : HEAD |
5626ae5e3316eced244adb6485c0927f1c7fdc41 |
|
08-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Cache invalidating needed to hook into view syncing as well.
--HG--
branch : HEAD |
114a0f74e0f825c6bd8aeadfafb248a030762a1f |
|
08-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
More correct file cache invalidating.
--HG--
branch : HEAD |
1098fc409a45e7603701dc94635927a673bee0c1 |
|
08-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Cache file works now with mmap_disable=yes. Still needs a few optimizations.
--HG--
branch : HEAD |
6a19e109ee8c5a6f688da83a86a7f6abeb71abdd |
|
06-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Removed cache_offset from mail_index_record and changed it to use extension
instead. Added possibility to register sync and expunge handlers for
extensions. Changed the way extension resets work: all extension updates
which were committed without having seen the reset are ignored.
--HG--
branch : HEAD |
37e6cf44d61a81c6839e3ab76234b54309d8d292 |
|
25-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
fix.
--HG--
branch : HEAD |
a53cb86b4d733d9c48ee4d285bed477c80825804 |
|
10-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Replaced fcntl_locks_disable with lock_method, so it's now possible to use
flock() to lock indexes.
--HG--
branch : HEAD |
4b058f90f9e8a2c6b2eed275de4eb8cc5195a71d |
|
08-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Buffer API change: we no longer support limited sized buffers where
writes past limit wouldn't kill the process. They weren't used hardly
anywhere, they could have hidden bugs and the code for handling them was too
complex.
This also changed base64 and hex-binary APIs.
--HG--
branch : HEAD |
58febed28f2af78b2d8a281c851d9b67160c4bd3 |
|
16-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Fix for circular record list detection, we can't use data stack for buffer.
--HG--
branch : HEAD |
44ff75ca53188056ff5a3e50428e3f2078800b3c |
|
31-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Transaction log file is now read-lockless.
--HG--
branch : HEAD |
21455709020274a628faa9b9bd7839cb8efe3c73 |
|
28-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
mail_cache_lock() crashed if index wasn't locked while it was called.
--HG--
branch : HEAD |
0cea9b1f4fa0495a48f5f097e40492517d67e1ba |
|
24-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Allocate cache->fields and cache->fields_file_map with malloc rather than
from pool.
--HG--
branch : HEAD |
befeac661293b8d4206118ac50b8be9751df8424 |
|
20-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Use larger field_pool size by default.
--HG--
branch : HEAD |
4bbee99b3aef449a9a2a11a5b5cf1ca486915c49 |
|
20-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache fixes. Decisions are saved again.
--HG--
branch : HEAD |
e015e2f7e7f48874495f9df8b0dd192b7ffcb5cc |
|
18-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Header caching redesigned. New design allows caching decisions per field, so
they can be divided to temporary/permanent. Cached headers are now always
returned in original order, old code didn't guarantee it. Some other caching
changes. (still missing code to store changes in caching decisions)
--HG--
branch : HEAD |
089756ceca55966f1a70e8591f6086026e51015c |
|
09-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Crashfix with empty mailbox
--HG--
branch : HEAD |
992a13add4eea0810e4db0f042a595dddf85536a |
|
08-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache file fixes, API changes, etc. It's still in somewhat ugly state, but
getting better..
--HG--
branch : HEAD |
65689cffc97a4e7338d83e95624cd4996770d197 |
|
05-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
disable cache file with mmap_no_write. it and mmap_disable will need some
non-mmap buffer for reading.
--HG--
branch : HEAD |
72cbf33ae81fde08384d30c779ff540752d9256c |
|
04-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache updating is done now by first reserving space where to write, and then
writing to it whenever buffer gets full. There is no persistent cache file
locks anymore because of this, but it also means that the same cached field
may be written multiple times to the file by different processes. Also since
we reserve more space than we actually need at first, it some space can be
wasted if multiple processes are updating the cache.
--HG--
branch : HEAD |
a40d26f83af808a0ea1e212c001d682a96d870b0 |
|
04-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Caching fixes and optimizations. Removed all network byte ordering code -
it's not worth the trouble and would require massive changes in indexing
code as well to be useful. Changed next_offset to prev_offset which is
updated while syncing index.
--HG--
branch : HEAD |
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8 |
|
04-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache file compression works now and compressed cache file is reopened.
Several other cleanups related to opening - cache file isn't created
immediately anymore.
--HG--
branch : HEAD |
fc024418a9f522fd8e9fafaa68f525727a439c99 |
|
29-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
fix
--HG--
branch : HEAD |
8aacc9e7c84f8376822823ec98c2f551d4919b2e |
|
28-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Added some smartness for deciding what to cache. Cache compression code compiles, but untested.
--HG--
branch : HEAD |
ba482d3624ca4f1b3d638e6e8470ba5134f21493 |
|
21-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Disable cache with mmap_disabled=yes, for now.
--HG--
branch : HEAD |
d565eaa943f29a49b97230ced57eec40ee65b4f9 |
|
19-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
don't do infinite looping
--HG--
branch : HEAD |
74d48e8b8c4ac1ec7a3b2a9fc4b7b5176aec01e8 |
|
19-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
cache file fixes
--HG--
branch : HEAD |
56f45b3f3ae20e5c933701f4657dda5ef1916855 |
|
19-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Several fixes and cleanups to cache file code, still badly broken
--HG--
branch : HEAD |
da5d50534cfca45d0aaaf0bdac17b287b4588809 |
|
20-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Beginnings of getting cache file working again. Easy to break currently, but
basics seem to work.
--HG--
branch : HEAD |
fd3d711f219fd6813492acbe051e04327f0ca0f0 |
|
02-May-2004 |
Timo Sirainen <tss@iki.fi> |
Added support for setting dirty flags for messages (TODO: undirty..)
s/mail_index_record_flag/mail_cache_record_flag/
--HG--
branch : HEAD |
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834 |
|
27-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
importing new index code. mbox still broken.
--HG--
branch : HEAD |
0d6c06233b2cdc5d854329ea6de3e1a0e244cdb4 |
|
27-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
removed out of the way of new index code
--HG--
branch : HEAD |
895c81ddf7ccb789c56f6f3d96906381c1d8ab17 |
|
09-Nov-2003 |
Timo Sirainen <tss@iki.fi> |
type fixes
--HG--
branch : HEAD |
6a280c911b436892b2e9587915ced0be3b47669e |
|
29-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
pread/pwrite fixes
--HG--
branch : HEAD |
b5369a59b5b620421ae63a2f88e2178bb4b796fc |
|
26-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
cleanup
--HG--
branch : HEAD |
6692f0e7fb96eda7388a14a67a34e8bbd444bc56 |
|
26-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
missing t_pop()
--HG--
branch : HEAD |
466d7ec9738e4ef41aab40e0179b5036eaf0de4b |
|
21-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
header fix
--HG--
branch : HEAD |
8f50240d0ee639d143479df8396a5dd16d5c268e |
|
21-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
assert
--HG--
branch : HEAD |
21d9c11f60624004a3bd9846afa5f755c8e254ba |
|
21-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
compression could have broken header lists
--HG--
branch : HEAD |
b3a53020f8f629fa8b0bc4be4ad5660d9701f22d |
|
21-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
Some cleanups and extra checks to detect if header names list gets
duplicated (can happen, why?..)
--HG--
branch : HEAD |
0de67e4b387ae597f674cf76ae7383d124d74bc6 |
|
20-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
Added dotlock parameter to specify how old lock file has to be to be
immediately deleted. This fixes the problem of never deleting uidlist.lock
files.
--HG--
branch : HEAD |
951f521e9275489a1a4f9272e84b6b8f3fb66d89 |
|
20-Oct-2003 |
Timo Sirainen <tss@iki.fi> |
We didn't notice cache compression immediately in other processes. Also some
other bugfixes.
--HG--
branch : HEAD |
cd466fe7b84b0223735a6469c7f7bc225f65996d |
|
21-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
data_stack_pool split into two: unsafe_data_stack_pool which works like
before, and a new one which verifies that stack frame stays the same
whenever the pool is accessed.
--HG--
branch : HEAD |
048bb8176801d9a122247cb343c83e890e4602e3 |
|
08-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
cleanup
--HG--
branch : HEAD |
c52f5a3c85692b6a0a55516c30c1c7f2d43b0a3a |
|
08-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
minor speedups
--HG--
branch : HEAD |
5c841f2879f7870540c231a12eebfb5f6425219c |
|
07-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
Fixed memory leak after compressing cache file.
--HG--
branch : HEAD |
498b5999198a5fe053f9670b085bec9c0dd5469d |
|
07-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
Header fetching committed changes twice, now we don't commit changes when
requesting a field which we know hasn't changed (pretty dummy logic, but
works for this case). Continued rows were also counted wrong.
--HG--
branch : HEAD |
c4cc38e0afec38b569d92571d481adc72643cdfd |
|
05-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
Include used-bit for all bytes in offsets to make sure their reads aren't only partial
--HG--
branch : HEAD |
4e8b456590e76a3c53c3bf638f87e0fe5c0cec96 |
|
03-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
mbox reading is kind of working again. Just don't try rewriting or expunging
:) Changing headers are also hidden from clients so mbox messages are finally
seen immutable as required by IMAP.
--HG--
branch : HEAD |
235cb7d2446d5c2e25962e5c461f51fe6579c581 |
|
22-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
fixes. maybe it works now.
--HG--
branch : HEAD |
bfe5d546f5ecc459d46dbc1c569d633de7c0516d |
|
21-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Removed some header/body size fields. We use only message_part now
everywhere since it's small enough. virtual_full_size was left because we
may know that by just reading maildir filename.
--HG--
branch : HEAD |
1bdda5c0c30463160c47151537e6bb2c6c994841 |
|
18-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Changed how cached headers are stored. Previously when we added new headers,
all the old headers were duplicated as well which wasted space. Also fixed
several bugs in caching.
--HG--
branch : HEAD |
5024402a628e9a6fc21eb8cdf2778486c6f2f92c |
|
11-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
some opening fixes
--HG--
branch : HEAD |
e6d35af29202a78abd9c6a8412f340693b36a948 |
|
11-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Save sync stamp in index header rather than in file's mtime.
--HG--
branch : HEAD |
cec8e298523c65f9ed832a2d1fc65068708d9f7d |
|
11-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Fixes for opening broken cache file.
--HG--
branch : HEAD |
6789ed17e7ca4021713507baf0dcf6979bb42e0c |
|
06-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Index cache file rewrite. It's not finished yet and mbox support is
completely broken. But it's getting difficult to maintain outside cvs :)
--HG--
branch : HEAD |