e9fbe5e18b798728041b7e2ffc6c4fa964fc35a3 |
|
31-Jan-2018 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on str_free(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- str_free(&E);
- }
+ str_free(&E); |
bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
6d1218e68ce883735ffde9d7907e626ab81b9fb5 |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: Add fs_file/iter_init_parent() |
4d71d712b42285afbd2a997f3408142ef0d5f899 |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: Split allocation from fs.iter_init() to a separate fs.iter_alloc() |
86ad48a2e740bd63a9b7299d7f3e229831d9b303 |
|
13-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: Split allocation from fs.file_init() to a separate fs.file_alloc() |
19557f192d37cd54a1a090a8a26d9d47265e4413 |
|
01-Nov-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
global: Fix spelling mistakes in comments
Original work by @andreasschulze and @jsoref |
03e102ddccaae9e944c503d4269de755731798e8 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: fs-metawrap - Don't try to write to an already finished ostream
Fixes a crash after recent changes when trying to write an empty file via
fs-metawrap. |
204ee6ed414f5e4eeb6f6c10763b55daf56f11ac |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on [io]_stream_unref(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- i_stream_unref(&E);
- }
+ i_stream_unref(&E);
@@
expression E;
@@
- if (E != NULL) {
- o_stream_unref(&E);
- }
+ o_stream_unref(&E); |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
96e1ed172ae59cae6bc6e6ddd24d22a158e23dfe |
|
11-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
fs-metawrap: Don't assert-crash when trying to write an empty file.
Fixes:
Panic: file fs-metawrap.c: line 401 (fs_metawrap_write_stream_finish): assertion failed: (file->super_output->offset > 0 || file->super_output->stream_errno != 0) |
7b9e289e4f74f5c3fcd96448fad4955d5057ca7f |
|
09-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
fs-metawrap: Fixed assert that checks we don't create empty files.
If the entire write failed, offset could be 0. |
b8f4e3aa58caa7ee16cf21a21f92521bf05cbdc4 |
|
31-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-fs: Do not abort parent of parent |
0c1f911643fd8542fb488bfe23a54000372cde80 |
|
23-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
lib-fs: Add fs_write_stream_abort_parent and use it
Will do all the things abort_error does, but leaves
error untouched. You are expected to set one yourself. |
be6fab2b1eded6b57d6688c6aa5a7c784f943865 |
|
23-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
fs-api: Add and use fs_write_stream_abort_error
This lets caller to specify error instead of setting it
with fs_error. Doing it like this lets us percolate the
error upwards. |
69b8187b29914bfe34cb446d319e60120f289a4c |
|
22-Aug-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
fs-metawrap: Added assert to make sure we don't create empty files.
It seems like this could be happening in some situation. |
a63cd84128875485e40ed804dbf0b0945526989c |
|
02-Aug-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: Added fs_get_nlinks()
Although fs_stat() could return this, its caller can't indicate whether
it actually wants the link count. Usually fs_stat() is used only to get
the file's size. In some backends it's not cheap to get the link count,
so adding this function allows the caller to explicitly ask for it. |
35f48128b30bb628091b26c1acd8c6e7247261fc |
|
06-Jul-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
fs-metawrap: Use fs_wrapper_*() wherever possible |
8296531314913c7f9d4ab1857c6f79ff1308a12f |
|
13-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: Added fs_switch_ioloop() |
d34b8a75f3b74e26adc85b6436d033b1dcfaf9da |
|
13-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: fs_wait_async() can't fail, so make it return void.
The individual requests can timeout, but not the waiting itself. |
082e10a9d07aeb9ae54d926d438db2f778c6157d |
|
01-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
fs-metawrap: Removed unnecessary code.
As mentioned in a0cf7d392, this can't happen. |
68ee8d7e681d9e1ac8b6bdad33a79c22054190ff |
|
01-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
fs-metawrap: Removed unnecessary code.
The caller already set success==FALSE if ostream was closed. |
38b9e0b1982c310295b013b2253cc9421f9ed385 |
|
31-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
fs-metawrap: Fixed buffer size while reading metadata header.
It's not enough to have the buffer size set to "large enough" at the time of
the stream creation, because i_stream_set_max_buffer_size() could be called
afterwards. |
1cc7a6c6a986b972fdb7eac146f4ca8036aca4e6 |
|
31-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: Don't duplicate backend name in fs_init() errors.
fs_init() already adds the "backend: " prefix to the error_r, so the callers
shouldn't do it again. |
6f187ae85911f63cb87271246c68f3c13a0adb7b |
|
18-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Use o_stream_nsend_istream() where useful
We can skip all of the io error handling and just leave it to
o_stream_nfinish(). |
ed47ce764bfdd40b70919f2c917d237b0a2e4aed |
|
13-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: Make sure fs-metawrap catches all write errors.
The full istream may not have been written in case ostream only partially
wrote the data (e.g. out of disk space?) |
8b8534cc005aeafe43d7d1de7b50924568328129 |
|
12-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
fs-metawrap: Minor code cleanup
temp_output==NULL, so these calls are equal. |
5a20b6bb2a3a04300e341755e3bc2029042727d4 |
|
12-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
fs-metawrap: Propagate fs_write_stream_abort() to parent always
It needed to be done also when temp_output==NULL, because we had already
started sending it to parent, but async parent wasn't being finished. |
a9be54bbbd815e0d2cfe1cd55e101802fb770a45 |
|
04-May-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: fs-metawrap stat() error handling improvement.
We can't just treat i_stream_get_size() returning 0 as the reason being
istream is async and not fully read. It might be, but it might also be
because of other reasons. And since we're closing the istream we couldn't
even properly finish up the async handling. So for now just return an
error if we see this happening. |
22b0b59ada158df7f00fd01d0c138317a843a546 |
|
30-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: Fixed fs_get_metadata() with fs-metawrap
If mail was already read to EOF. |
ab41e122aed42fdfae3f29378aff57bbe7743734 |
|
23-Apr-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-fs: fs-metawrap stat() and get_metadata(): use existing istream if possible
This may reduce reads from parent fs, but it's at least required for the
following commit. |
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/' |
fdd858ac68b637fc449c1a426ffadee33db00d72 |
|
17-Nov-2015 |
Timo Sirainen <tss@iki.fi> |
lib-fs: Improved fs-metawrap's fs_stat() error message. |
b5439deff8f1e1529220a6cb348c83963ab6a433 |
|
15-Jun-2015 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: If written file unexpectedly shrinks, return error instead of assert-crash.
This shouldn't be happening, but we can't fully control it so an error is
better. |
4107ad482be1200251ae1d4c40ca5c54120af855 |
|
15-Jun-2015 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: Don't assert-crash when writing an empty file. |
a052f297c2ec37c66c647c1b1078ff9d36c85fa2 |
|
09-May-2015 |
Timo Sirainen <tss@iki.fi> |
lib-fs: Minor code cleanup
Both temp_output and super_output are NULL so it doesn't matter which we
use, but this change makes it use the intended variable. |
a7b2e5e2a2bcbb45d150579b84b7a8a307b58c4a |
|
09-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
lib-fs: Optimized fs_stat() for fs-metawrap after writing a file. |
41843bdb6cd96d761a18bab5d5825f344d02420c |
|
17-Feb-2015 |
Timo Sirainen <tss@iki.fi> |
lib-fs: Added FS_METADATA_OBJECTID macro. |
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> |
2ff37573056d56857d165f28aeebf649ebaa67b5 |
|
14-Nov-2014 |
Timo Sirainen <tss@iki.fi> |
lib-fs: fs-metawrap now supports adding more metadata fields while file is being saved.
This potentially adds yet another temporary file write though. |
56cf7fccd4c424ab058b251311b181c71b535765 |
|
15-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: Fixed iteration wrapping, broken by earlier changes. |
f89e4933a0f8227c3dfd4b4ad2141a156934a95f |
|
15-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
lib-fs: fs-metawrap now fully wraps fs_iter_* to fix tracking struct fs.iters |
98ac7027d857b8a88903e55f0cb1624f7aa8c560 |
|
13-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: Add FS_PROPERTY_COPY_METADATA property for wrapped fs backends.
This is because if we simply use the parent copy the metadata gets copied
as well. |
f1177d2dcb6adf9d9734c85f11378e9df9c1fe97 |
|
28-Aug-2014 |
Timo Sirainen <tss@iki.fi> |
lib-fs: Fixed metawrap_fs.copy() to work with FS_PROPERTY_COPY_METADATA backends.
This is done by simply copying the entire file with the metadata included
instead of rewriting it. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
0b32a8d139f6a4f2b18a6444fc66d31b4a1b0da6 |
|
10-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
lib-fs: Added fs_file_close() to explicitly close all streams that the file has open. |
bd9e7407f61422f369d2c568b50ab31c72cb2597 |
|
05-Apr-2013 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: Fixed fs_copy_finish_async() wrapping |
c4e3c997c04eb6f93f782c5fa53354390ed07a02 |
|
27-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
lib-fs: Always keep the error in the parentmost fs.
This fixes problems with getting the correct error message when wrapper
filesystems are used. |
141890ed1123f4bf95ff007d91bd561f63041ea1 |
|
26-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-fs: fs-metawrap should prefetch using the same file as it uses for reading. |
6772f52a7b2e9ba7d4edf9a05d78a900c2b8f73f |
|
05-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: Don't duplicate work if fs_get_metadata() is called multiple times. |
0e6e2c5ca5fee3a7f4cdaae14ceb7d96ac7f6c20 |
|
05-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: Memory leak fixes |
26aa7d1e627eb7cdaa096ac6ea80f1ce12fae0f3 |
|
05-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: Set underlying file async only for fs_read_stream() lookups. |
deed0441882796b3d985ab867e96b9c56d9fc0d9 |
|
04-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: Delay writing the metadata headers until first data is written.
Also some other read/write fixes. |
a06af8e117e14e2ddc5835bcbe0d2f0370cbc0a1 |
|
04-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
lib-fs: Added FS_OPEN_FLAG_SEEKABLE. Globally handle fs_read_stream() seekability and waits. |
05d80389f3ae892f2206140fe5f3b6197019114d |
|
04-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: Fixed stat() to work when parent file's input stream didn't have a parent. |
5ca0738418192b994708602178402c703a2332e0 |
|
04-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
fs-metawrap: Error handling fixes |
84669c712403b742cc07ae70229725c486ef1235 |
|
21-Jan-2013 |
Timo Sirainen <tss@iki.fi> |
lib-fs: Added "metawrap" wrapper to implement metadata as headers in the file content. |