d808185fd6263862e93637d296f0c4fb0529118e |
|
25-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_index_set_error_nolog() |
82d158d37db5cfb4e26affe4bc2f2a235901d1b9 |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_index.event |
72af6886cb51e0ee02c9b3d6a7572eef8a0e236f |
|
20-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_index_set_cache_dir() to change .cache's directory |
3a78329166819e06f2929ce44e360514c6a80a8e |
|
12-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_index_base_optimization_settings |
7ce557e379d2df8c4c3c5639f251881f0a55f3b5 |
|
12-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Replace mail_index_set_log_rotation() with mail_index_set_optimization_settings()
This allows more easily adding optimization-related settings. |
4394b73cacaf2c31a9b601f66b6e26a1c8f114b4 |
|
12-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Track .log.2 rotation time in index header
This avoids unnecessarily stat()ing the file. Also it's a bit better
since it's tracking the actual rotation time, not the mtime of what the
.log file happened to have at the time of rotation.
The initial rotation timestamp is written only to the dovecot.index header
without going through dovecot.index.log. This works, because the
dovecot.index is written practically always after a log rotation. For the
rare cases when it doesn't happen, the dovecot.index.log.2 just gets
deleted later after the next log rotation. |
b66a207ddcfc72a634186ec7e9a82df28ffc1d4e |
|
24-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add mail_index_set_log_rotation() |
12f0c4396d2d9c02b7d5e070aaf64fed5853e9bf |
|
21-Nov-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-index: Limit mmap syscall errors in index to 1/s |
95e4021e3e2a733d27f48fe97912fc96df52005f |
|
21-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Revert log flooding prevention / 3c014db6f
This was intended only for mmap() errors. |
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccb |
|
11-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Improve error messages when transaction log is unexpectedly lost |
3c014db6f22aa3d18676f69f2881ab4336b6ecff |
|
09-Sep-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-index: limit mail_index error prints to one per ioloop_time
This is to prevent log flooding. |
0dffa25d211be541ee3c953b23566a1a990789df |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: unsigned int:1 -> bool:1
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch] |
2988b4cbf3540a0c02a9ddf185cafec5938c0cac |
|
04-Oct-2015 |
Timo Sirainen <tss@iki.fi> |
lib-index: Removed some unnecessary fields. |
45b0d8d0b97be14d10e3a3c12c169e4b352b2aac |
|
09-May-2015 |
Timo Sirainen <tss@iki.fi> |
lib-index: If header is corrupted after syncing, log the reason why. |
cfadd9a17fca2f25981664b02e38eafe27b6686f |
|
09-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Removed dovecot.index locking related code, which is no longer used. |
06fc580f6baf83fe5bb94c64be8149d527b01a42 |
|
07-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added path parameter to mail_index_create_tmp_file()
This allows using it for creating any kind of a new index file with proper
file permissions.
Some of the old code should probably be changed to use this. Maybe even move
this function to public mail-index.h |
f5e06b955adead65ab7281b6410059230c0bf512 |
|
02-Jun-2014 |
Phil Carmody <phil@dovecot.fi> |
mail-index: new helper macro with more user-friendly semantics
As the record ids range from 1..records_count, but the data is
stored as if in a C-style 0-based array, current clients of
MAIL_INDEX_MAP_IDX() must subtract 1 from the index themselved.
New MAIL_INDEX_REC_AT_SEQ() macro does the subtraction for you,
it gives you (the address of) the record from a seq number.
Uglified users of the former will be migrated to the latter.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
ef4d0eafab4d26bba047551db1e23ceff8aa9404 |
|
15-Jan-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Keep track of views and transactions in linked lists.
This makes debugging easier. |
0b2d4626c6fb4e40bc81c56d8227191f3c7e1ea3 |
|
17-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Don't bother tracking if header/records were changed.
They aren't really needed. When mail_index_write() is called, we already
know we want to update the index. |
b71e08759c02a49d02cdfb28343351ad28fc10b5 |
|
12-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: dovecot.index file is no longer overwritten, so it doesn't need to be locked. |
724b7fcf28c2547eb9c837d0e99241c0501dccf3 |
|
15-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Changed mail_index_set_fsync_mode() to use a separate enum for the mask. |
a75d470c9223a75801418fcdda258885c36317e0 |
|
20-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Reverted "support for non-pointers" part of the hash table API changes.
Originally I wrote it using clang, which didn't give as many warnings as gcc
did. I guess this way is safer anyway.. |
4ee00532a265bdfb38539d811fcd12d51210ac35 |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Array API changed: ARRAY_DEFINE(name, type) -> ARRAY(type) name
Easy way to update your existing code:
perl -i -pe 's:ARRAY_DEFINE\(([^,]+), *([^)]+)\);:ARRAY($2) $1;:' **/*.[ch] |
678d0463849ba777106eb7875f27db07a5d8e3df |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Hash table API is now (mostly) type safe. |
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. |
5da1aa5197a43d83f0fb3eeb83125c7cd73d1b62 |
|
11-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
shared mailboxes: Per-user flags can now be stored in private index files.
This can be enabled by adding e.g.:
mail_location = mdbox:/var/shared/mdbox:INDEXPVT=~/mdbox/shared |
d5498f4d64a97d04a1b608920f23eb2ad2353d05 |
|
03-May-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Removed unused locking code. |
d7c8280f58292cc292eba9209dcc9024fe96cf06 |
|
03-May-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Updated dovecot.index file only by recreating it, never write to it directly.
This is safer, and nowadays there shouldn't be much of a performance loss
with it either, since dovecot.index isn't updated very often.
This also allows removing all locking from dovecot.index file, although for
now we'll keep it in case old Dovecot versions are simultaneously writing to
the index. |
47e0598840ecffa364ebed523e06939e22738f06 |
|
08-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added mail_index_set_ext_init_data() for adding data to index on creation.
This can be used to avoid race conditions on mailbox creation for mailbox
formats that require this (sdbox). |
8a3f549a3cb1d6dd980a4fa3db284653e256dae7 |
|
07-Dec-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added mail_index_reset_fscked() |
1727610dbc69920b7f0d0622b4e5d7127c59093d |
|
24-Feb-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: Give better assert-crashes if view or log view isn't closed.
Earlier it should have also assert-crashed with "log->files == NULL", which
didn't make it clear enough why the files aren't NULL. |
07e80e04c8876b6bf3f95266f48b41e1a681e445 |
|
06-Oct-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Avoid unnecessary pread()s at end of transaction log file.
If we've already read until EOF while the file has been locked, there's no
need to do it again. Previously this worked while index was being synced,
but not while committing a transaction. |
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 |
9f32b9444d2a6db8f556d2c49ffceab1a59791ff |
|
09-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Don't close index files if they're still being used by another mailbox.
--HG--
branch : HEAD |
d041ddb437ee7000174161405581ab85c0ba314a |
|
09-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Index deletion is now a request that gets finalized by index sync.
--HG--
branch : HEAD |
651fc0f1e43fef3e02e0e7b5f498973b05f641d7 |
|
07-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
Added support for marking mailbox index deleted. Don't allow any changes after that.
This is going to help with race conditions when deleting mailboxes.
--HG--
branch : HEAD |
9f19a50d5966643c4d1c5ca06868ac2ad31bc4d5 |
|
19-Nov-2009 |
Timo Sirainen <tss@iki.fi> |
Transaction commits can now track how many uid/modseq updates were ignored.
--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 |
bc397dfcbe6e22aa1ca2e15a9f3cd42f39e2ec4e |
|
13-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
Moved mail_index_seq_array_*() to mail-index-util.c and added its own .h file.
--HG--
branch : HEAD |
e156adefc1260d31a145df2f5e9b3c82050d4163 |
|
28-Jun-2009 |
Timo Sirainen <tss@iki.fi> |
Whenever file's group changing fails, show the group origin in the error message.
--HG--
branch : HEAD |
1f80b32fc28f7a723ff07c1694230a090808b506 |
|
01-Jun-2009 |
Timo Sirainen <tss@iki.fi> |
index: Handle better errors where a new file's group can't be changed.
--HG--
branch : HEAD |
c24c0f0a208e5ffc35dc8be19a9b504a5326467a |
|
20-May-2009 |
Timo Sirainen <tss@iki.fi> |
Created mail_index_map_lookup_seq_range() from code in mail-index-view.c.
--HG--
branch : HEAD |
5806683c1c3f5b1997e92a023c0fe39912d4df5d |
|
20-May-2009 |
Timo Sirainen <tss@iki.fi> |
Moved some code from mail-index-map.c to mail-index-map-hdr.c
--HG--
branch : HEAD |
0bea219e4f944cd17a9ccd1131b7fe081d1bb0a7 |
|
30-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
Write to main index file less often.
--HG--
branch : HEAD |
686c00553a7cea22272548d9fb8c888170965ec9 |
|
30-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
Write to main index file less often.
--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 |
589a9c6e8ee22071c14171c04bfc6bfe17121871 |
|
18-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
dbox: Create dovecot.index.backup files.
--HG--
branch : HEAD |
5aeb15e5817fbd4b1d8de540aa7673e3819a8030 |
|
14-Dec-2008 |
Timo Sirainen <tss@iki.fi> |
Replaced literal "keywords" strings with a macro.
--HG--
branch : HEAD |
2b8fab6d39e8d1dbd3d546d2577fc1caeafdd64a |
|
13-Dec-2008 |
Timo Sirainen <tss@iki.fi> |
mmap_disable=yes: Opening index always tried to read it from transaction log.
This caused more disk I/O than necessary.
--HG--
branch : HEAD |
a914bff43644dd9b3977244203839ca74161e40c |
|
01-Sep-2008 |
Timo Sirainen <tss@iki.fi> |
Rewrote thread indexing code. It's a lot simpler and takes less disk space.
We no longer try to keep a hash table and the entire thread tree stored on
disk. Instead we keep a simple Message-ID string (actually just "uid, ref#"
pointer) -> unique index number mapping on disk, read it to memory and use
it to build the thread tree. After the initial build the thread tree is
still updated incrementally.
--HG--
branch : HEAD |
95a1a5195d56f3cf5d1e529aad668f87ad3b979b |
|
11-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Modseqs are no longer calculated from transaction log sequence + offset.
Now they begin from 1 and each "visible" transaction increases it by one.
--HG--
branch : HEAD |
94aa90d2d17a7aebcda5a4193a62e80ddbb169b7 |
|
30-May-2008 |
Timo Sirainen <tss@iki.fi> |
Fixes to handling races in initial index creation.
--HG--
branch : HEAD |
a2f250a332dfc1e6cd4ffd196c621eb9dbf7b8a1 |
|
15-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Initial CONDSTORE support.
--HG--
branch : HEAD |
ed50658501d9ae8c85f6264831056b1debed11c3 |
|
07-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Don't allow too large extension header sizes. They're probably caused by
file corruption.
--HG--
branch : HEAD |
3675a7e9bd3775ba13fe8bc93915902513a0f1a4 |
|
28-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Verify extension fields are correct when registering it from transaction
log.
--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 |
5d1833b98fa85d8061626aa986f38dcbcd70553e |
|
10-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Fixes to handling cache file syncs and expunging.
--HG--
branch : HEAD |
80fc743146da5130de34174cdaad2576f103723f |
|
08-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
fsync transaction commits only if the transaction contains change types
specified by mail_index_set_fsync_types().
--HG--
branch : HEAD |
43d32cbe60fdaef2699d99f1ca259053e9350411 |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.
--HG--
branch : HEAD |
c25356d5978632df6203437e1953bcb29e0c736f |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Changed .h ifdef/defines to use <NAME>_H format.
--HG--
branch : HEAD |
c2feb7d13482d0f60691cd71d06d42a80df99397 |
|
15-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Fix ESTALE handling when reading main index.
--HG--
branch : HEAD |
8ababf3e7b15f793370d1dedf85825d38b42633f |
|
15-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
fsck fixes now keyword header problems
--HG--
branch : HEAD |
746d35bf3dba3ae5ddbcecb9732f60d5e9de77ef |
|
15-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
If extension header is broken, drop it when fscking.
--HG--
branch : HEAD |
3b80595fcf2001cf7b2fcc6290823e38f4a142fc |
|
15-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
fsck won't fail anymore with "corrupted index", all problems are fixed.
Added mail_index_fsck_locked().
--HG--
branch : HEAD |
1fd0d511885c30028aba388588151acf4ee85e75 |
|
15-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
fsck the index while it's being mapped.
--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 |
d051664df497582e1eb75a9f238d04b65e858db8 |
|
02-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Cleaned up keyword handling code.
--HG--
branch : HEAD |
7ded22760598b78ee29f9418eacc0abe3fb51055 |
|
02-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Only index extension indexes are now called "ext_id". For map extension
indexes use "map_ext_idx".
--HG--
branch : HEAD |
f7656d7bc15510a4259ed74ddda3c560de8a51c1 |
|
02-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Check that header is still valid after syncing. If not, fsck.
--HG--
branch : HEAD |
3bf14402b7ec0795fbe5721b31b7e98e883d98c0 |
|
27-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
If we notice that dovecot.index.log gets deleted, make sure that
dovecot.index gets written in next sync in case it was also deleted.
--HG--
branch : HEAD |
88187ee880b4829443e0d55ea7d145d9d5880217 |
|
12-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Removed explicit locking from views and maps. They were already locked all
the time when they were used. Because of this change several functions can
no longer fail, so they were changed to return void, and a lot of pointless
error handling was removed.
--HG--
branch : HEAD |
cfa9359fbd6a967ccdcd553c5e483a093885ab6f |
|
07-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
mail_index_map_register_ext() now takes ext_offset instead of hdr_offset.
hdr_offset is calculated from ext_offset. Both are stored to the ext struct.
--HG--
branch : HEAD |
12053b7b4b57dbd2790057426d1633988eedad56 |
|
06-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
mail_index_map_get_ext_idx() should return bool, not int.
--HG--
branch : HEAD |
a28a6267f48971117dec958b160deefd14ebb7a6 |
|
06-Aug-2007 |
Timo Sirainen <tss@iki.fi> |
Prevent copying record data when appending new messages.
--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 |
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 |
bf91bed88d4e294b4577ba2a3b14d87cf35ae135 |
|
02-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
mmaping works again properly. Changed to use private mmaps which are
directly modified. The file is kept locked the whole time while it's being
mmaped, so multi-process updates may be slower than necessary.
--HG--
branch : HEAD |
14c474d9f4591c397ed0b5206af6537c7b52c924 |
|
01-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Rewrite index lock handling.
--HG--
branch : HEAD |
b0be0bead3d6963149f7f2a9504b8ab5aced9af5 |
|
01-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
mail_index_map now contains pointer to index, so all functions taking map
parameter don't need index anymore.
--HG--
branch : HEAD |
e3689d0f073341e844638f34e1e4d0b7bb053cc8 |
|
28-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Handle losing index file better. Handle fsck better.
--HG--
branch : HEAD |
8e57335924f5ff57cbd1929ec99764dc267c3312 |
|
20-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Updating index file by overwriting changed parts didn't work correctly.
--HG--
branch : HEAD |
bc1d1497d715cc5c820ff518f070f78c39ef6cdc |
|
19-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Handle corruption marking by unlinking dovecot.index file. Removed
mail_index_write_base_header().
--HG--
branch : HEAD |
8d131435ba4648c8821160ec38d508c97177c715 |
|
19-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Removed index->hdr. Use index->map->hdr instead.
--HG--
branch : HEAD |
9bc6e10d9c6d6ffb4a2ed49a3b3d2a180f2a87a3 |
|
18-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
View's counters can no longer be unreliable or broken.
--HG--
branch : HEAD |
10a97b15c34119ffe2d2eab9b975252fed631df2 |
|
16-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Moved mail_index_write() to its own file.
--HG--
branch : HEAD |
51795bfe9d05d92fe942cb451aec2b9d16d32a11 |
|
15-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
int/ext/mailbox sync offset changes: Combined mailbox and int offsets to
"tail" offset and renamed ext offset to "head". This makes it clearer how
they're supposed to be used.
--HG--
branch : HEAD |
2a6af811ea3de3cf9e2f15e446674dd21b0705f3 |
|
11-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Initial commit for major index file code cleanup.
- dovecot.index file isn't anymore required to be updated when syncing.
- Getting the latest index file mapping is now done always by reading
dovecot.index and then reading the latest changes from dovecot.index.log.
- mmap()ing dovecot.index file is slower than reading it, so it's not
currently done unless the file is at 256kB. This may change though.
- Some things are still broken.
--HG--
branch : HEAD |
2a34e2be33f8a17d21384a5527ed9f75f4d270e0 |
|
11-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Moved mail index map related code to its own file.
--HG--
branch : HEAD |
50ad45a7f45495b2d88d270cf066765b6f5fb77d |
|
16-May-2007 |
Timo Sirainen <tss@iki.fi> |
If index file is shared locked while we're trying to exclusively lock it,
don't wait 2 seconds for the lock. Also don't bother copying the index into
a temp file when it's locked, do that only when it's being unlocked so it
doesn't have to be written twice.
--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 |
46c31f64b9f0949f00b7819f45b22f2d64b2ea27 |
|
29-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Better type safety to module_contexts arrays. Already fixed some bugs.
--HG--
branch : HEAD |
625101600b8c05f72f79b13604de0c751a73e959 |
|
24-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
cleanup
--HG--
branch : HEAD |
190237ce467d2389dfb809874b0fec86d3c7968d |
|
18-Jan-2007 |
Timo Sirainen <tss@iki.fi> |
Keywords were sometimes being re-added to the index even while they already
existed, causing the record size to bloat.
--HG--
branch : HEAD |
375fac6f5a29f687fe8117f814cd7e594b0a1dd2 |
|
16-Jan-2007 |
Timo Sirainen <tss@iki.fi> |
Added some extra checks/asserts
--HG--
branch : HEAD |
8887bf3757d51d73887dd20b1db3334d867d3817 |
|
28-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Added dotlock_use_excl setting.
--HG--
branch : HEAD |
369a1084c500a9df7448ffa9409ce32e42060bc2 |
|
17-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Added fsync_disable setting. Also added missing fsync()ing to dbox when
saving mails.
--HG--
branch : HEAD |
00efa7d99981e18e286c02b18c1163dde18ee521 |
|
15-Dec-2006 |
Timo Sirainen <tss@iki.fi> |
Type safe callbacks weren't as easy as I thought. Only callback(void
*context) can be handled generically. Others can be handled specially, but
only if all the parameters are pointers, otherwise eg. int parameter can be
replaced with long without compiler giving any warnings.
--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 |
11fa9bc1e84f7cc88d953c0a0ae4e2cd07881957 |
|
13-Oct-2006 |
Timo Sirainen <tss@iki.fi> |
Handle moving to memory failures better so we won't crash in some
situations.
--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 |
d6badc27cd6e8d3398877b6766cb0aaeef3a7800 |
|
28-Jun-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
Beginnings of joining mail-storage API more closely to mail-index, so that
mail-index could be directly used if needed. Currently only transactions
are joined.
--HG--
branch : HEAD |
8d80659e504ffb34bb0c6a633184fece35751b18 |
|
28-Jun-2006 |
Timo Sirainen <tss@iki.fi> |
Array API redesigned to work using unions. It now provides type safety
without having to enable DEBUG, as long as the compiler supports typeof().
Its API changed a bit. It now allows directly accessing the array contents,
although that's not necessarily recommended. Changed existing array usage to
be type safe in a bit more places. Removed array_t completely. Also did
s/modifyable/modifiable/.
--HG--
branch : HEAD |
9315dd69233d554452df0c12bc57002d2042a8f4 |
|
30-May-2006 |
Timo Sirainen <tss@iki.fi> |
We were updating index->map also when syncing views.
--HG--
branch : HEAD |
fa5957ffc9b676bfd649fa9953e63e72ee4ebeb4 |
|
03-May-2006 |
Timo Sirainen <tss@iki.fi> |
Index header's seen/recent/deleted counters weren't always correct after
syncing a view. This caused some problems with recent SEARCH optimizations,
eg. EXPUNGE not always working.
--HG--
branch : HEAD |
fea541eec46707f9b01bd3cbc981d73c1e808a54 |
|
02-May-2006 |
Timo Sirainen <timo.sirainen@movial.fi> |
mmap_disable: When syncing in-memory index from transaction log, we didn't
skip external transactions which were already been in our in-memory
mapping, causing "Append with UID n, but next_uid = m" errors.
--HG--
branch : HEAD |
89b548af722113acb5d63dfffb44423cb60f91e4 |
|
25-Feb-2006 |
Timo Sirainen <tss@iki.fi> |
Renamed safe-open.* to nfs-workarounds.*, safe_open() to nfs_safe_open() and
added a new global NFS_ESTALE_RETRY_COUNT which everyone uses instead of
defining their own.
--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 |
f5e6b996a758f4174634338c11f3495b012363ce |
|
14-Feb-2006 |
Timo Sirainen <tss@iki.fi> |
Removed duplicated function declarations.
--HG--
branch : HEAD |
a045c3aba2610c6ed0bf1c346df1c6d8f7b9fbfd |
|
19-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Fixed mail_index_move_to_memory() to work better and made it public
--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 |
de12ff295bb3d0873b4dced5840612cbacd635ef |
|
06-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Moved expunge handlers to mail_index_registered_ext.
--HG--
branch : HEAD |
c27f03fa8fd2ef4acd1db814fae7d90e0eb9d3ae |
|
06-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Cleanup: Created mail_index_registered_ext which is used for
index->extensions array. Put sync_handler to it and removed sync_handlers
array.
--HG--
branch : HEAD |
41bb0aa8e357876bc9a1916a37c9e3e78e5f8185 |
|
02-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Don't rewrite index file every time with mmap_disable=yes.
--HG--
branch : HEAD |
d74899545d913eac91c82b692927b32c3bf36aba |
|
24-Sep-2005 |
Timo Sirainen <tss@iki.fi> |
Added some comments
--HG--
branch : HEAD |
75ef04fc62a3955d3a5310410e09735cbd4e972b |
|
17-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
mmap_disable=yes: Transaction log might have been rotated before everything
was committed to index.
--HG--
branch : HEAD |
bb10ebcf076c959c752f583746d83805d7686df8 |
|
02-Apr-2005 |
Timo Sirainen <tss@iki.fi> |
Keywords are now stored in X-Keywords headers in mbox. Did several related
API changes to get better performance.
--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 |
d7737c090219b03e98a04bb30f84ef55e397319b |
|
27-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Changed keywords_buf to array. Added mail_index_sync_get_keywords().
--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 |
ed3ce1282f6bc35d20e82c2c23a2990c8dfe876f |
|
05-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Assert if mail_index_map() is called recursively.
--HG--
branch : HEAD |
2ef8fac74c9d0bfc330bf53bb06df7e9d5f08e7d |
|
05-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Some error handling path crashfixes.
--HG--
branch : HEAD |
faed8babca9914257f34fb2e603d74016d563b2d |
|
05-Feb-2005 |
Timo Sirainen <tss@iki.fi> |
Internal changes in how keywords are handled. struct mail_keywords isn't
automatically freed anymore, added *_keywords_free() for that.
--HG--
branch : HEAD |
13c6532dc104d23061e6901783ceb1ff8872c206 |
|
16-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
Changed dotlocking API.
--HG--
branch : HEAD |
41e1c7380edda701719d8ce1fb4d465d2ec4c84d |
|
10-Jan-2005 |
Timo Sirainen <tss@iki.fi> |
Keyword fixes.
--HG--
branch : HEAD |
16c89b1260c9d07c01c83a9219424d3727069b2e |
|
26-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Initial support for keywords. Syncing to mbox/maildir doesn't work yet.
--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 |
b9ce555e8624a5593b3bfd81b572b7d2e1e1fca5 |
|
05-Dec-2004 |
Timo Sirainen <tss@iki.fi> |
Don't try to fsck when we're modifying index. It could have happened with
corrupted transaction logs.
--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 |
ab286a8b58306eb8d22fc18342b6c199fd428e1e |
|
29-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Wrong extension sync_handler might have been called if index extensions
didn't match current map's extensions.
--HG--
branch : HEAD |
d7095f3a4466fbb78b2d5eb3d322bc15a5b0ab1f |
|
29-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Changed mail_index_map_to_memory() to mail_index_map_clone(). Even if the
index is already in memory, we wish to copy it instead of just raising
refcount. Fixes some problems with mmap_disable=yes.
--HG--
branch : HEAD |
abbe0657a4d6271740d41cf1de55e8686f5769fc |
|
24-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
mail_index_refresh() isn't public anymore, mail_index_view_open_locked()
works better for the purpose.
--HG--
branch : HEAD |
e86d0d34fe365da4c7ca4312d575bfcbf3a01c0e |
|
14-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Avoid re-reading index file with mmap_disabled=yes. Instead sync it by
reading transaction log file.
--HG--
branch : HEAD |
1b3bb8d39686ed24730cbc31cc9a33dc62c8c6c3 |
|
14-Nov-2004 |
Timo Sirainen <tss@iki.fi> |
Update view's header only after syncing the view. This and other changes fix
several view syncing problems and crashes.
--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 |
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 |
2a734f36105e33ab452d057df6bc7a2b7d9f96f0 |
|
25-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Use separate sync offsets for internal/external transactions. Pending external
transactions are committed into index at the beginning of syncing, internal
ones aren't.
--HG--
branch : HEAD |
5a4ab3d6e108a899c8b51bebd0094a37b738d5a1 |
|
17-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Removed mmap() memory area protections. They weren't always set correctly.
Also grsec crashed with them anyway.
--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 |
bbf796c17f02538058d7559bfe96d677e5b55015 |
|
03-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Index extensions can now specify record alignment, and it's possible to
resize header and records. Fixes mbox crashes with some 64bit systems.
--HG--
branch : HEAD |
7797aa2479e99aeb71057b7a2584b2cb72e4d3f8 |
|
26-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Renamed "extra record info" and variations of it to "extension" or "ext" in
short.
--HG--
branch : HEAD |
5a07b37a9df398b5189c14872a600384208ab74b |
|
05-Sep-2004 |
Timo Sirainen <tss@iki.fi> |
Save extra record/header infos into index file permanently.
--HG--
branch : HEAD |
44ff75ca53188056ff5a3e50428e3f2078800b3c |
|
31-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Transaction log file is now read-lockless.
--HG--
branch : HEAD |
ca316aeb7648d3f1bcf45231f73ddeb1b67a6961 |
|
10-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Cache fixes. Lookups now look into transactions too.
--HG--
branch : HEAD |
a2645bdd6547b87e2380f33ce78640118b9e9e68 |
|
08-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
crashfix
--HG--
branch : HEAD |
2ca4cb08680aebb1474d762738cf436871f095fb |
|
04-Jul-2004 |
Timo Sirainen <tss@iki.fi> |
Make sure we don't set cache_offsets to old cache files.
--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 |
7e94cf9d70ce9fdeccb7a85ff400b899e6386f36 |
|
24-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Record size is allowed to change between index files. This will allow adding
extensions dynamically for existing indexes.
--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 |
024815ea2ffdda9ea79919f18e865663977f73ea |
|
14-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Fixes for extra_records
--HG--
branch : HEAD |
1175f27441385a7011629f295f42708f9a3a4ffc |
|
14-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Modifying extra_records should work now.
--HG--
branch : HEAD |
8e7da21696c9f8a6d5e601243fb6172ec85d47b2 |
|
14-Jun-2004 |
Timo Sirainen <tss@iki.fi> |
Added support for per-index sized mail_index_record.
--HG--
branch : HEAD |
e687badfdd7f4001e9a89a80a2c4a79ec4bafc8d |
|
28-May-2004 |
Timo Sirainen <tss@iki.fi> |
Don't complain about transaction log indexid changes when rebuilding index.
--HG--
branch : HEAD |
e4b09b008ab544eb8994beecbfffefa21d855e43 |
|
26-May-2004 |
Timo Sirainen <tss@iki.fi> |
mail_index_refresh() - allows forcing a refresh check
--HG--
branch : HEAD |
d67f54632110cfb6aafe2d7cd1f99b031c0b208a |
|
10-May-2004 |
Timo Sirainen <tss@iki.fi> |
syncing fixes
--HG--
branch : HEAD |
e4fb5bfcdff32d337d054cce36e00e1cdfaae9f8 |
|
03-May-2004 |
Timo Sirainen <tss@iki.fi> |
INDEX_KEYWORDS_BYTE_COUNT was counted wrong so index files were larger than
they needed to be. Added sizeof(keywords_mask_t) to compat_data. Added limit
to growing index file exponentially.
--HG--
branch : HEAD |
685393de106e55b61f754d420e378d05bd462ebb |
|
01-May-2004 |
Timo Sirainen <tss@iki.fi> |
remove mail_index_reset() completely
--HG--
branch : HEAD |
5ec0ca7ff13595daf0d096c17100afb352e6294a |
|
01-May-2004 |
Timo Sirainen <tss@iki.fi> |
missing index file fixes
--HG--
branch : HEAD |
93b29720c5141f787bd1861796867e4595c9d084 |
|
01-May-2004 |
Timo Sirainen <tss@iki.fi> |
handle losing index file
--HG--
branch : HEAD |
0add8c99ca65e56dbf613595fc37c41aafff3f7f |
|
01-May-2004 |
Timo Sirainen <tss@iki.fi> |
fixes
--HG--
branch : HEAD |
2a909d051d11e67400b333904e24bf421e99cad7 |
|
29-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
recent fixes
--HG--
branch : HEAD |
40ef82c46f6652412b068ebcdac7c3e74840a284 |
|
29-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
Don't modify index file when creating new transaction log.
--HG--
branch : HEAD |
b2105c78f0fd58281317e6d777ded860f33153a3 |
|
28-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
fixes
--HG--
branch : HEAD |
690af4a90eaf8611c2573d34126bb7a852c50a44 |
|
28-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
when growing index file, do it exponentially for this session (files being
added one at a time).
--HG--
branch : HEAD |
fddec1bf093b45eaedcece13c649b811208e0547 |
|
28-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
locking fixes, sync fix
--HG--
branch : HEAD |
5c1a8aee989af87bddefd71e2aa83aa2bd695155 |
|
28-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
Locking changes. bugfixes.
--HG--
branch : HEAD |
18398a5d21c88cbb34c601c6b6c1f9dea502e1ca |
|
28-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
Added fcntl_lock_disable setting to allow indexes to work with NFS. Some
other locking fixes.
--HG--
branch : HEAD |
31ddc75584c5cde53d2e78a737587f2e7fdcb0d2 |
|
28-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
Forced locking to be right with mprotect()ing index file. Support for
disabling mmap for indexes, and disabling just mmap+write().
--HG--
branch : HEAD |
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834 |
|
27-Apr-2004 |
Timo Sirainen <tss@iki.fi> |
importing new index code. mbox still broken.
--HG--
branch : HEAD |