bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
c147bff818798a979d93537f72f5c1f68f5d5ba8 |
|
24-Nov-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
global: Use t_buffer_create
sed -i -e 's/buffer_create_dynamic(pool_datastack_create(), */t_buffer_create(/g' |
d61f31663f3debf9e49d1e0d8ef3c9fb13aad6c4 |
|
30-Oct-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib,lib-index: Use #ifdef with WORDS_BIGENDIAN
Some were missing from the last change. |
debc93e622751c6c09e8105e504c5833f1ca0d6d |
|
30-Oct-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
global: Use #ifdef instead of #if with WORDS_BIGENDIAN
This is to not rely on undefined WORDS_BIGENDIAN being evaluated as 0. |
47a5a7e8296f3b8f2fac9a0659d4de3f2723ba4a |
|
06-Oct-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
global: Use PRI* macros and %zu instead of casting |
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); |
f784d5bb8edbec88829524135cfa100129f5384d |
|
17-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Add/change switch case "fall through" comments
These fix warnings with gcc 7's -Wimplicit-fallthrough |
5e03576913a0030de6f8d22c79e353a968a6a35f |
|
11-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix wrong mail_index_modseq_header automatically
It happens only on the next sync, although that isn't actually guaranteed to
happen. Still, it happens almost always so this should be good enough. |
7e78f1cfc10cc0540134b5507e08524a0fdd5c93 |
|
11-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Code cleanup - move code to get_modseq_next_offset_at()
In preparation for making the next commit smaller. |
ace341ac567376f37ded043c4c0f2c46b9aaecb1 |
|
11-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix modseq tracking with multiple flag updates
The earlier code was checking only the first flag record update. If the
first one had only internal flag changes but (some of) the rest didn't,
the modseq wasn't counted correctly. This was probably pretty rare. |
892d85b7c6c36eb3ae6d0a78e4028a5b88b9f3a5 |
|
11-Aug-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix modseq tracking for MAIL_INDEX_MAIL_FLAG_UPDATE_MODSEQ
This is used to increase modseq for mails when their private flags change.
Use an already existing MAIL_TRANSACTION_FLAG_UPDATE_IS_INTERNAL() that
does this properly.
(This change preserves another bug, which is fixed in the next commit.) |
e653e88f7058237047a98313140d67d40cb56b74 |
|
17-Jul-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-index: Add missing colon to log text
It's added elsewhere |
5b809b97673fb0a73aa5b9d82122612d699f6c5b |
|
12-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Don't ignore mail_transaction_log_move_to_memory() failure |
6d2f4a21bdfab2901b01f292b397256328e631be |
|
22-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix start_offset > sync_offset error handling for in-memory indexes |
0a1a4e586ced13635fc1b8f2c78c94cb35ef645a |
|
20-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Improve "start_offset > current sync_offset" error message.
Try to make it clear what is the root cause of it. |
a0c8af555ec481ab12c2a99518cf7b20debd1627 |
|
20-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: mail_transaction_log_file_get_highest_modseq_at() - return error string
This can help figuring out why some error happened when more context is
provided in the caller's error messages. |
ce9d23c7c1e621398d2572a1d95171136f7ef6a2 |
|
20-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: mail_transaction_log_file_map() - return reason/error string
This can help figuring out why some error happened when more context is
provided in the caller's error messages. |
92dab926b2f2270057b40a907a00cf8eb2309ed6 |
|
02-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Don't increase modseq for backend/dirty flag changes
These flags are used only for internal changes and they shouldn't be
triggering any modseq changes.
To avoid modseqs from unexpectedly shrinking, the new modseq counting
behavior is enabled only for newly rotated transaction log files that have
a new minor_version. |
e0f4fbf127b192667c62af7875c4f2ca294b6c7a |
|
02-Apr-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Add macros to check if transaction log file version is new enough.
The version numbers are 8bit, so we can generate a single 16bit number out
of them. |
8e90ca575864d29d0ded6ea71cd9747aab0a38f4 |
|
13-Feb-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-index: clear file->mmap_size only after logging it
Logging the error with size=0 loses information. |
9c7e81a1f5e629efa2324c6c22ce02f6f6e9c792 |
|
13-Feb-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib-index: don't reset ioloop_time on mmap error
The variables seems to have been in the wrong order. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
efe78d3ba24fc866af1c79b9223dc0809ba26cad |
|
24-Dec-2016 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
global: Replaced all instances of memset(p, 0, sizeof(*p)) with the new i_zero() macro.
Used the following script:
C_FILES=`git ls-files *.c`
H_FILES=`git ls-files *.h`
for F in "$C_FILES $H_FILES"; do
echo "$F"
perl -p -i -e 's/safe_memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero_safe(&$1)/g' $F
perl -p -i -e 's/safe_memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero_safe($1)/g' $F
perl -p -i -e 's/memset\(&\(?([^,]*)\)?,\s*0,\s*sizeof\(\g1\)\)/i_zero(&$1)/g' $F
perl -p -i -e 's/memset\(([^,]*),\s*0,\s*sizeof\(\*\g1\)\)/i_zero($1)/g' $F
done |
ce2312763f6b5fd2da8bfb20847b87f29b063fa8 |
|
23-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix assert-crash if .log creation unexpectedly fails at the end
Pretty much the only reason for this to happen is if the index directory
was deleted while another process still had the index open. Even this
doesn't normally trigger this crash, because there are other checks earlier
that usually catch it. So it crashes only in some race conditions.
Fixes:
Error: rename(.../dovecot.index.log.newlock, .../dovecot.index.log) failed: No such file or directory
Panic: file mail-transaction-log-file.c: line 105 (mail_transaction_log_file_free): assertion failed: (!file->locked) |
261c0ffe765bcd5c654f7c85f5874baea870a8a5 |
|
19-Dec-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-index: Make sure buffer is not null before freeing
Fixes signal 11 crash under stress. |
f9f30736bc6e4cf535085824e7e124506fe2dbbb |
|
28-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: mail_transaction_log_file_sync(): Don't mix I/O errors and corruption |
9018d05c381d859f4b856a5ea0cad3538092ba1c |
|
28-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix assert-crash after "log file shrank" error.
Fixes:
Panic: file buffer.c: line 316 (buffer_set_used_size): assertion failed: (used_size <= buf->alloc) |
52d2b356e3ddb4e59ee09c10d47add9d3280284b |
|
21-Nov-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-index: Limit mmap errors in txn log file to 1/s |
c0d1bfc45e224251cb549de8d8804861e8acb517 |
|
18-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Improve errors - return reason in mail_transaction_log_file_open() |
6ade0d76250bc7db405cd20f3e1b660f74c77bd4 |
|
18-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: If mmap() fails, include the attempted size in the error. |
9e6d83a3ef6abb393eeebca423cfd0d8cb08d430 |
|
18-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Added mail_index_transaction_get_highest_modseq() |
57dd2621d4230bc2e06c69a4b9f8cf8f0ff2bc93 |
|
18-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Make sure an already-corrupted index/log isn't written |
2485e31c7ef8ac6656dd8b9def439fc6cf6f7598 |
|
09-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fixed mail_index_modseq_get_next_log_offset() when accessing .log.2
file->sync_offset was set only after header, so sync_highest_modseq was also
same as initial_modseq. The previous code then just returned offset pointing
to sync_offset, which was too early. |
1ff03d2244dd08effadfecec365bec28793a1aa0 |
|
09-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Make sure new dovecot.index.log files start tracking modseqs.
This will make mail_index_modseq_get_next_log_offset() work correctly even
if modseqs haven't been explicitly enabled. |
2d5d7890bd9b282eb1092fc788a2432a6c79a7ad |
|
03-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Replace buffer_get_used_size(buf) with buf->used
Doesn't make any diffence to code generation, but it's somewhat simpler code.
It's also more consistent since most of the code nowadays uses the ->used. |
4eccf5310af7bed72cd6f7a559a93165c516e514 |
|
28-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: If transaction log was locked for at least 30 secs, log a warning (not at 3min)
This is because we log a warning about it already when locking it took 30
seconds, so it's useful to see which process was actually keeping the lock. |
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/' |
6e1a910370a55db38b97e12026cd69b2dab38bef |
|
04-Dec-2015 |
Timo Sirainen <tss@iki.fi> |
lib-index: mail_transaction_log_file_map() didn't properly check start_offset
If it was too high, it still returned successful mapping. This could have
caused an assert-crash later on when the start_offset was actually attempted
to be used. |
39087f589d24f3072f220c2ed4528ee323f129ff |
|
08-Sep-2015 |
Timo Sirainen <tss@iki.fi> |
lib-index: Replaced some unlink()s with i_unlink*()s where we could.
This changes some mail_index_set_error() calls to i_error()s, but because
these unlink() failures don't actually fail the operation it doesn't matter.
In fact it may be even better that it doesn't overwrite the existing
index->error if it exists. |
8409959d66804dc963bc6fcdcc9a01da0d56a978 |
|
09-May-2015 |
Timo Sirainen <tss@iki.fi> |
Make Coverity happier. |
1bea995196e46157e495a78b8f93780c576b3ef8 |
|
25-Feb-2015 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added an assert.
It seems to be triggering later on, but not sure how it's happening. |
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> |
e1ad2d13f5f154ee975eed5c8e7f1a7823082685 |
|
20-Nov-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: If transaction log is unexpectedly recreated while it was locked, log a nice error.
Instead of just assert-crashing. |
537598efa668f2277b429bfe35a342a7036e04d0 |
|
23-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Detect broken log_file_tail_offset updates without assert-crashing. |
2f8da04d700cc23fcd6630226a4866e828b761bd |
|
09-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Include reason string in warnings about keeping transaction log locked for too long. |
da4376093d4e1b26b14ea1e945689fb7056fe0a0 |
|
09-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Replaced some automatic transaction log unlocks with asserts.
Some earlier Dovecot versions were read-locking transaction logs and this
was useful there. But now we only do exclusive locking for the log head, so
it's an error not to explicitly unlock the files. |
94cb0544ba0b6e249f20b76ad481bad27a633632 |
|
09-Oct-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: If locking transaction log times out, show the PID which has it locked. |
f90cbe597c41d5cc91debd371f8648bd8e6ffbc2 |
|
28-Aug-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index, lib-storage: Fixed race conditions with deleting mailbox.
Now only one process can successfully finish mailbox_mark_index_deleted(). |
082e82792b8ac33ad42beac510441b37a3c50737 |
|
07-Jul-2014 |
Timo Sirainen <tss@iki.fi> |
lib-index: Don't update log_file_tail_offset unnecessarily.
Update it only if we're already writing to transaction log anyway or if
we're required to update the offset because mail_index_sync_commit() has
increased it past non-external transactions (this is especially important
with mdbox map index). |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
76959d3d6fed45d5f5e1397fcdcf09a5adb87f24 |
|
04-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed modseq updates when modseq was over 32bits long |
fee561b9d9162b130e662914fcebc9dd99b5c320 |
|
14-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: mail_index_attribute_[un]set() adds changed attributes' keys to transaction log.
This provides them both a modseq (so their changes become visible) as well
as an efficient way to see what attributes have changed by reading the
transaction log. The values themselves aren't written to the log, because
they could be large. |
8ae72ad7d0c69e972cfa65d1e2ce4e3e9a8b765c |
|
24-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Replaced all -1U and (unsigned int)-1 with UINT_MAX.
It's somewhat clearer this way. Also clang's -fsanitize=integer gives
runtime errors about -1U (but not about explicit casts, so no need to change
(type)-1 casts). |
2dadd5dacee37d409fa699597bfddc03074e4853 |
|
22-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed assert-crash on some error conditions. |
1deffbbcd7affd2ec89284f3c644cc73db0a2b90 |
|
19-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Give a better error message if index is readonly and log is tried to be locked. |
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. |
e925f007930955f10fa8728509a44f7a53d2b13e |
|
14-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed marking transaction log file corrupted due to added O_APPEND flag. |
0bb5699d56b7c9f897ee8e627ae4a8ba4fe0c21b |
|
28-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
Make static analyzer happier |
bd503f12eb667df389a99162f567bd8785798f55 |
|
03-Nov-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Write to transaction log using O_APPEND flag.
Most OSes should do the writes atomically so that reads won't see partially
written data. We don't currently rely on this, but it would be possible in
future to remove locking entirely from writing to transaction log. |
4fcee755029b42c1f31227211290fa5047c00075 |
|
18-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed handling of finding a duplicate dovecot.index.log file_seq
Previously we assumed that the already opened file was always the wrong one,
but more common was that the newly opened file was .log.2 which should have
been deleted. |
b222354c9553cd60b7dd418885e10c0473f73985 |
|
18-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Handle better race condition there dovecot.index.log and .log.2 are the same link. |
97cb20eb77d486ef67eac50567e3080faca025c1 |
|
03-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
Typofix: s/TRANSCATION/TRANSACTION/ |
5921647936e3d9a2dc60c0e49c66dd33efca234d |
|
25-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Transaction log creation crashed if required extension name length wasn't divisible by 4. |
3281669db44d09a087a203201248abbc81b3cc1a |
|
06-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
Renamed buffer_create_*data() to buffer_create_from_*data() for consistency.
Especially i_stream_create_from_data() was a very similar function, which
made it difficult to remember which one should have "from" and which one
shouldn't. |
b66d803de86bfb411165b3465b0d9ef64ecfe2a1 |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Avoid using (void)s by adding ATTR_NOWARN_UNUSED_RESULT attributes and other ways. |
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. |
7bd301fdbfefe7cef3576d19ece29c75ebe53baf |
|
24-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Make static analyzer happier. |
6cb2c6ecddcdbeac9e6c73a292244747e12a793e |
|
24-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Added file_dotlock_delete_verified() and changed file_dotlock_delete() to return void. |
eea8f295efb50d5ae6cfe056b20faa65b542a823 |
|
03-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
lib-index: Minor code cleanup. |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
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). |
e3f89f85e4e2d67d287b7fcd856f241713ba8311 |
|
15-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: Assert-crashfix when reading transaction log header fails with ESTALE. |
8f0e6d627f3646e559ac5224c306839669d1a5e0 |
|
15-Aug-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: Avoid crashing when dealing with duplicate transaction log sequences. |
0f4f40b4ead495be9f445b3cdbee8753148667d6 |
|
03-May-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: Try to avoid duplicate "duplicate transaction log sequence" errors. |
94d5a3fe15ff7096f3a2c7edcf790b5d3b8d1acb |
|
28-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
lib-index: If .log file can't be opened read-write, fallback to read-only indexes. |
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. |
e188bab0b830136d04a1dd8b55e9afefae20d930 |
|
03-Dec-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added "transaction boundary" record for future compatibility. |
63e2edd14ae7b1dc4a08e2e659501dbf519462f9 |
|
05-Nov-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixed another transaction log read optimization.
Buffer's size should always be the same as sync_offset, otherwise some
optimizations could think that the data doesn't have to be re-read even
though it was updated in disk already. |
f34227d18c5458c5a8bfe576ecf8d7bb4e75162e |
|
05-Nov-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fix to transaction log read optimization.
The log wasn't always refreshed while locked when it should have. |
a32ac1ad1ccc36d29f30b017197bb2a57feacd1a |
|
04-Nov-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Minor error message improvement. |
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. |
9061a2a9a7f8da780a5b50af3603f828167c6b13 |
|
29-Sep-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: If transaction log file is small enough, just read all of it to memory immediately. |
d9fda7e3a0fa5551547ac3e3054b837fc77f4bfb |
|
23-Sep-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Log a warning if transaction log lock is kept over 3 minutes. |
bdd7a96c363346f7c38f389791be1487ca08775b |
|
02-Sep-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Lock timeout setting wasn't actually used in all places. |
de9d79337eca11a7f9c1cd476c74dfe4f09a4bd7 |
|
30-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
Removed mail_update_uid() / mail_index_update_uid().
It was working properly only with mdbox and there wasn't really a need for it.
--HG--
branch : HEAD |
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 |
b5b3b4c9159f506cdfdce7399faaeeffdf73faf7 |
|
25-May-2010 |
Timo Sirainen <tss@iki.fi> |
Changed some index error handling conditions to log an error instead of assert-crash.
--HG--
branch : HEAD |
57549c98995eb312013f5d98ea6ccf25175a6f18 |
|
14-May-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Give a better error message if transction log file shrinks unexpectedly.
--HG--
branch : HEAD |
1d738cce754bc64bbc66d3355ebdaf3f6eac55f1 |
|
14-May-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Use IO_BLOCK_SIZE
--HG--
branch : HEAD |
8bb360f9e5de1c25e4f875205bb06e8bf15dae14 |
|
05-Apr-2010 |
Timo Sirainen <tss@iki.fi> |
Removed dead code.
--HG--
branch : HEAD |
8872e5c991430f96138a46e36b7f3c2c40d8e5c2 |
|
09-Feb-2010 |
Timo Sirainen <tss@iki.fi> |
lib-index: Added support for undeleting a deleted index.
--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 |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--HG--
branch : HEAD |
90c23747727c85f80e4e8eed7968f0edbeac7ac5 |
|
10-Nov-2009 |
Timo Sirainen <tss@iki.fi> |
index: If we see duplicate transaction log files, avoid corrupting the newer one.
--HG--
branch : HEAD |
40ad2c4902e9d83557f2e8a4bff3d98fea2c8aa1 |
|
27-Oct-2009 |
Timo Sirainen <tss@iki.fi> |
Test WORDS_BIGENDIAN with #if, not #ifdef.
Patch by Apple.
--HG--
branch : HEAD |
08e57864511e8ec1df7494fb69d8044aae778650 |
|
16-Oct-2009 |
Timo Sirainen <tss@iki.fi> |
lib-index: looking up offset for transaction log's initial modseq failed.
--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 |
6c77165712bcac2fd93a6a1b7c9460a3482a66b7 |
|
07-Sep-2009 |
Timo Sirainen <tss@iki.fi> |
lib-index: Minor code cleanup.
--HG--
branch : HEAD |
d1baa8c6f97cdb1b3c2c44a73cc21f9dfc7a963f |
|
06-Aug-2009 |
Timo Sirainen <tss@iki.fi> |
lib-index: Fixes to handling UID changes.
--HG--
branch : HEAD |
029cfcdce65b284d5230adf1c920a5f526b03b5c |
|
31-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
index: Code cleanups.
--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 |
ad48319996942463675b53877092ab7e13a7a75a |
|
29-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
Added ability to specify message's minimum modseq value.
--HG--
branch : HEAD |
0c909e3461607eadcd66f4eac69b7f34e37fccf1 |
|
14-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
Keep track of expunged messages' GUIDs and expose them via mailbox_get_expunges().
The message GUIDs are stored in expunge records to transaction log. Before
doing the final expunge, Maildir and dbox verify that the GUID in expunge
request matches the current actual GUID. The GUID is stored in 128 bit
field. If the real GUID isn't 128 bit, the bits are taken from SHA1 of the
GUID.
--HG--
branch : HEAD |
8e361d2906b0e44f7175a20981f8d2280645b58b |
|
14-Jul-2009 |
Timo Sirainen <tss@iki.fi> |
buffer_create_[const_]data() API change: Take buffer_t as parameter instead of allocating it.
--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 |
6f90ce01176bd920609d9d12e6419b9ba27c1359 |
|
13-Apr-2009 |
Timo Sirainen <tss@iki.fi> |
indexes: Error handling fixes.
--HG--
branch : HEAD |
5d264bf541597af95a31c342644f6bb0fa6e0708 |
|
10-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
indexes: Fixes to handling shrinking tail offsets.
--HG--
branch : HEAD |
8da27efaa133449b6aa70d64c8adbc59915520b8 |
|
10-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
Improved "corrupted transaction log file" error message.
--HG--
branch : HEAD |
8562da433e7659ce8ad6044ff5d8f44869c8cb73 |
|
05-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
indexes: Make sure we don't shrink log_file_tail_offset.
--HG--
branch : HEAD |
bf8f4f90cb5e5f32c2611ba3425557964b9c47fc |
|
23-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
Don't reset modseqs when reseting index.
--HG--
branch : HEAD |
f153a2cec0319f549388d28f8cfd4d50229d1132 |
|
10-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
indexes: Fixes to handling shrinking tail offsets.
--HG--
branch : HEAD |
b397665e90fa0fc7c6a9156fdd6cf28b571e8e39 |
|
10-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
Improved "corrupted transaction log file" error message.
--HG--
branch : HEAD |
dffa503fd4ce31334346e539496084c80a2d8d37 |
|
05-Mar-2009 |
Timo Sirainen <tss@iki.fi> |
indexes: Make sure we don't shrink log_file_tail_offset.
--HG--
branch : HEAD |
c15f15f71b885415fdaf2395ce52805770148917 |
|
12-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Improved "Transaction log corrupted unexpectedly" error message.
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--HG--
branch : HEAD |
86581c5a511d90fb823cf3c5987b7543e5b86328 |
|
22-Oct-2008 |
Timo Sirainen <tss@iki.fi> |
If we detect that transaction log file size is invalid, mark the log corrupted.
--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 |
88b8aea03a24ef7a9efc30399080487b7eb03537 |
|
31-Aug-2008 |
Timo Sirainen <tss@iki.fi> |
Don't give bogus "log_file_tail_offset shrank" errors.
--HG--
branch : HEAD |
aef92409cf369afdd2ecd81a4f80083cd4082f46 |
|
31-Aug-2008 |
Timo Sirainen <tss@iki.fi> |
Write CPU endianess to transaction log header and check it's correct when reading.
--HG--
branch : HEAD |
0bf3eac1110a902e7ec7e695c64e8e46c114e623 |
|
28-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Index modseq handling crashfix.
--HG--
branch : HEAD |
b6612c334604eeb27e1ca2bd804ac66dcbc2eaad |
|
21-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
View syncing: Keep track of highest modseq in views. If we lose transaction
log, return all messages with higher modseq than the old highest-modseq as
having changed. This works better than the previous code which compared the
old modseq which may have already changed after the previous view sync.
Return changes based on modseq being larger than
--HG--
branch : HEAD |
85144b5f0bc763de14c7d87291a90ef74ac241a2 |
|
21-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Keep modseqs as 1 until the first modseq ext intro record enables them.
Performance should be better again when modseqs are disabled.
--HG--
branch : HEAD |
e64d7b6f388fecd0c83a4f2acb54e30d5ac98c6c |
|
17-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
Make sure initial_modseq is correct when rotating transaction log.
--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 |
56684951606f4fa13bc18da1f43fbdcb3f656094 |
|
25-May-2008 |
Timo Sirainen <tss@iki.fi> |
When creating a new transaction log, don't reuse an existing one if its
sequence isn't 1.
--HG--
branch : HEAD |
7184b2f499d5b8977671e92310148da72170edca |
|
30-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Fix to previous optimization: Don't crash if we want to read older data from
transaction log.
--HG--
branch : HEAD |
c026384095b555cc86d032b043d107cc371aacec |
|
21-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Small optimization: Don't try to pread() log file if we already know we've
read everything.
--HG--
branch : HEAD |
5707510e5d1c8aa79a0acf737ee1429caf3d59c2 |
|
06-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Error message fix.
--HG--
branch : HEAD |
1353efc453d019e30cb135aeadaeae8ad9b121a4 |
|
06-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Error message fix.
--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 |
76b43e4417bab52e913da39b5f5bc2a130d3f149 |
|
01-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2008.
--HG--
branch : HEAD |
629600d9a85e8025c15a5eaeb80329e116e022c9 |
|
09-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
If we're rotating log file while we're locked, lock the newly created file
so the lock is preserved.
--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 |
b251b66e48ed682fa511b9dabc979807fc18f71b |
|
04-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Don't mmap() transaction log file if we're reading less than a page.
--HG--
branch : HEAD |
470365df69b5a0b84146149e3ea1adcb27b1482e |
|
04-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
NFS attribute cache flushing fix
--HG--
branch : HEAD |
47571dffa47750bd6188b9a846cea8c3b066753e |
|
04-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Code cleanup
--HG--
branch : HEAD |
04b8a90af181cc4c7959266855e8ed50a22ed413 |
|
25-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
NFS cache flushing updates.
--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 |
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 |
9716b2665ee3938d3dfe64bda44d7c3ae3b55d30 |
|
16-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
nfs_safe_link(): Support linking files without original link count=1. Use it
when copying maildir files, but only if mail_nfs_storage=yes.
--HG--
branch : HEAD |
d98109d230575391c1dfe1bea3800d3ff0ac3f11 |
|
15-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Use nfs_safe_link() instead of link().
--HG--
branch : HEAD |
837ea26bce080f166b2ec90d901faeff58beb22b |
|
15-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Don't flush attribute cache twice after locking transaction log.
--HG--
branch : HEAD |
d7363f0716a4ca8bf8d9af1fe277113c705739b0 |
|
15-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Avoid flushing attribute cache when checking to see if there's new data in
transaction log and we're not locked.
--HG--
branch : HEAD |
f537e7efaec891d6b3320ca94331d09ca8c4a4db |
|
15-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Keep better track of when we need to flush NFS attribute caches.
--HG--
branch : HEAD |
54cb36f32da0f2b1225a62e9e5717d521e21aa99 |
|
14-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Don't flush attribute cache unless we're locked and we really need to know
the latest changes.
--HG--
branch : HEAD |
dec85d9856c33f427a06dda01e0e50de0bc8fa7d |
|
14-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
NFS attribute cache flushing fixes. nfs_flush_attr_cache() takes now
flush_dir parameter and nfs_flush_attr_cache_fd() returns FALSE if file
handle is already stale.
--HG--
branch : HEAD |
b7c051d9dd7ec0526f3c2c1f09f00d3a61c6576d |
|
10-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Code cleanup
--HG--
branch : HEAD |
f87702d8d147f66d3fb6c41e5695c67f6d00612e |
|
28-Oct-2007 |
Timo Sirainen <tss@iki.fi> |
s/shrinked/shrank/
--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 |
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 |
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 |
7ab64f2a89e0256693a4f0f0d6c3da6daab27cdc |
|
15-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Code cleanup
--HG--
branch : HEAD |
347acd14d8da653ce3757b3e29981326502bed6b |
|
14-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Fixed "duplicate transaction log sequence" errors when we noticed that log
file was recreated while we were trying to create it ourself.
--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 |
8cd0a1a2200e65cd134d03fe3f93ec02f1746359 |
|
12-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Fixes
--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 |
ae8817f05005f57bba32479a610b52d083e2b6eb |
|
01-Jul-2007 |
Timo Sirainen <tss@iki.fi> |
Added support for resetting index.
--HG--
branch : HEAD |
2d49f150b4bce6f2f59a84e268e4777901c3e42c |
|
28-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Handle indexid changes better.
--HG--
branch : HEAD |
e777a43ec49dd968b9b6064030fb40ce9e14097e |
|
21-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Better race condition fix for mmaped log files
--HG--
branch : HEAD |
c131bf703b200890867f4c3839597ffdc7eba18d |
|
21-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Handle race conditions in mmap()ed transaction logs better.
--HG--
branch : HEAD |
de14556e542b2a75a3a2118f76241f3c85313ebd |
|
20-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Log an error if non-head log file couldn't be synced to the next file's
prev_file_offset position.
--HG--
branch : HEAD |
8c7000574087d5702cc3830e7f80c695ff8e9221 |
|
20-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Handle partial reads with mmap_disable=no correctly.
--HG--
branch : HEAD |
f2d4cd6f0ea6afe06c1f1b7aaff213fc3de3989e |
|
20-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
If read() returned a partial transaction, don't give an error because it
could be just that kernel temporarily didn't return the expected data.
--HG--
branch : HEAD |
6f5d19886f36fb20777618ef9362be39d3dc4182 |
|
20-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
If log offsets are broken, don't assert-crash.
--HG--
branch : HEAD |
8d131435ba4648c8821160ec38d508c97177c715 |
|
19-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Removed index->hdr. Use index->map->hdr instead.
--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 |
8bae533c96e129dca8ee7b494d7de5aeb4a043a2 |
|
13-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Don't assume that transaction record type is a bitmask in the transaction
log file, even though it's internally used as such.
--HG--
branch : HEAD |
2e99f3f3bb35715ce5e0a75a2f2a9bac3ab4224b |
|
13-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Fixes to mail_transaction_log_file_map() error handling.
--HG--
branch : HEAD |
902222fb0928d1701f20a384b73f327b1d9a15dd |
|
13-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
mail_transaction_log_move_to_memory() can't fail anymore. Moved the code to
-log-file.c.
--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 |
4bc96ba6f1d67a90a75fa131bcd2cd508ea5a05a |
|
11-Jun-2007 |
Timo Sirainen <tss@iki.fi> |
Moved mail transaction log file related code to its own file.
--HG--
branch : HEAD |