rpms/evolution-data-server/F-10 evolution-data-server-2.24.5-sqlite-fsync-rework.patch, 1.1, 1.2 evolution-data-server.spec, 1.246, 1.247
Matthew Barnes
mbarnes at fedoraproject.org
Fri Mar 13 16:01:24 UTC 2009
- Previous message (by thread): rpms/evolution-data-server/devel evolution-data-server-2.25.92-sqlite-fsync-rework.patch, 1.1, 1.2 evolution-data-server.spec, 1.257, 1.258
- Next message (by thread): rpms/ncmpcpp/F-10 .cvsignore, 1.2, 1.3 import.log, 1.1, 1.2 ncmpcpp.spec, 1.1, 1.2 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mbarnes
Update of /cvs/pkgs/rpms/evolution-data-server/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13368
Modified Files:
evolution-data-server-2.24.5-sqlite-fsync-rework.patch
evolution-data-server.spec
Log Message:
* Fri Mar 13 2009 Matthew Barnes <mbarnes at redhat.com> - 2.25.5-3.fc10
- Revise patch for RH bug #568332 to match upstream commit.
evolution-data-server-2.24.5-sqlite-fsync-rework.patch:
Index: evolution-data-server-2.24.5-sqlite-fsync-rework.patch
===================================================================
RCS file: /cvs/pkgs/rpms/evolution-data-server/F-10/evolution-data-server-2.24.5-sqlite-fsync-rework.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- evolution-data-server-2.24.5-sqlite-fsync-rework.patch 11 Mar 2009 10:27:24 -0000 1.1
+++ evolution-data-server-2.24.5-sqlite-fsync-rework.patch 13 Mar 2009 16:01:20 -0000 1.2
@@ -1,7 +1,7 @@
diff -up evolution-data-server-2.24.5/camel/camel-db.c.sqlite-fsync-rework evolution-data-server-2.24.5/camel/camel-db.c
--- evolution-data-server-2.24.5/camel/camel-db.c.sqlite-fsync-rework 2009-01-31 08:06:07.000000000 -0500
-+++ evolution-data-server-2.24.5/camel/camel-db.c 2009-03-11 06:02:10.000000000 -0400
-@@ -36,239 +36,114 @@
++++ evolution-data-server-2.24.5/camel/camel-db.c 2009-03-13 11:57:43.000000000 -0400
+@@ -36,239 +36,112 @@
#include "camel-debug.h"
@@ -12,7 +12,7 @@
static sqlite3_vfs *old_vfs = NULL;
- GStaticRecMutex only_once_lock = G_STATIC_REC_MUTEX_INIT;
+-GStaticRecMutex only_once_lock = G_STATIC_REC_MUTEX_INIT;
-GStaticRecMutex sync_queue_lock = G_STATIC_REC_MUTEX_INIT;
-#define LockQueue() g_static_rec_mutex_lock (&sync_queue_lock)
-#define UnlockQueue() g_static_rec_mutex_unlock (&sync_queue_lock)
@@ -24,7 +24,7 @@
-typedef struct _sync_queue_data {
- guint timeout_source; /* id of the source */
- GThread *running_thread;
-
+-
- int sync_flags;
-} sync_queue_data;
-
@@ -82,16 +82,10 @@
- data->sync_flags = 0;
- }
- UnlockQueue ();
-+ while (TRUE) {
-+ /* Block until a request arrives. */
-+ data = g_async_queue_pop (cFile->queue);
-
+-
- /* this should not happen, once we are in a thread, the datas are ours */
- g_return_val_if_fail (data != NULL, NULL);
-+ /* Make sure we can safely deference. */
-+ if (data == NULL)
-+ continue;
-
+-
- /* do the sync itself, but do not block the sync_queue;
- any error here is silently ignored. */
- call_old_file_Sync (/*sqlite3_file*/pFile, sync_flags);
@@ -111,23 +105,29 @@
-
- return NULL;
-}
--
++ while (TRUE) {
++ /* Block until a request arrives. */
++ data = g_async_queue_pop (cFile->queue);
+
-static gboolean
-prepare_to_run_sync_in_thread (gpointer pFile)
-{
- sync_queue_data *data;
++ /* Make sure we can safely deference. */
++ if (data == NULL)
++ continue;
+
+- g_return_val_if_fail (pFile != NULL, FALSE);
+- g_return_val_if_fail (sync_queue != NULL, FALSE);
+ /* Extract flags and discard request. */
+ flags = *((gint *) data);
+ g_slice_free (gint, data);
-- g_return_val_if_fail (pFile != NULL, FALSE);
-- g_return_val_if_fail (sync_queue != NULL, FALSE);
+- LockQueue ();
+ /* Check for exit request. */
+ if (flags & SYNC_THREAD_EXIT)
+ break;
-- LockQueue ();
--
- data = g_hash_table_lookup (sync_queue, pFile);
- /* check if still tracking this file and if didn't get rescheduled */
- if (data && data->timeout_source == g_source_get_id (g_main_current_source ())) {
@@ -140,10 +140,15 @@
}
- UnlockQueue ();
--
++ /* Clear the exit flag. */
++ flags &= ~SYNC_THREAD_EXIT;
+
- return FALSE;
-}
--
++ /* One more for the road? */
++ if (flags != 0 && getenv ("CAMEL_NO_SYNC_ON_CLOSE") == NULL)
++ call_old_file_Sync (cFile, flags);
+
-/*
- Adds sync on this file to the queue. Flags are just bit-OR-ed,
- which will not hopefully hurt. In case the file is waiting for
@@ -174,8 +179,7 @@
- data->sync_flags = data->sync_flags | flags;
- } else {
- data->sync_flags = data->sync_flags | flags;
-+ /* Clear the exit flag. */
-+ flags &= ~SYNC_THREAD_EXIT;
++ g_async_queue_unref (cFile->queue);
- /* reschedule */
- g_source_remove (data->timeout_source);
@@ -186,14 +190,10 @@
- data->sync_flags = flags;
- data->running_thread = NULL;
- data->timeout_source = g_timeout_add (SYNC_TIMEOUT, prepare_to_run_sync_in_thread, pFile);
-+ /* One more for the road? */
-+ if (getenv ("CAMEL_NO_SYNC_ON_CLOSE") == NULL)
-+ call_old_file_Sync (cFile, flags);
-
+-
- g_hash_table_insert (sync_queue, pFile, data);
- }
-+ g_async_queue_unref (cFile->queue);
-
+-
- UnlockQueue ();
+ return NULL;
}
@@ -301,7 +301,7 @@
g_return_val_if_fail (cFile->old_vfs_file->pMethods != NULL, SQLITE_ERROR); \
return cFile->old_vfs_file->pMethods->_nm _call; \
}
-@@ -293,15 +168,41 @@ def_subclassed (xDeviceCharacteristics,
+@@ -293,15 +166,41 @@ def_subclassed (xDeviceCharacteristics,
static int
camel_sqlite3_file_xClose (sqlite3_file *pFile)
{
@@ -346,7 +346,7 @@
if (cFile->old_vfs_file->pMethods)
res = cFile->old_vfs_file->pMethods->xClose (cFile->old_vfs_file);
else
-@@ -316,10 +217,26 @@ camel_sqlite3_file_xClose (sqlite3_file
+@@ -316,10 +215,30 @@ camel_sqlite3_file_xClose (sqlite3_file
static int
camel_sqlite3_file_xSync (sqlite3_file *pFile, int flags)
{
@@ -365,18 +365,24 @@
+ /* If a sync request is already scheduled, accumulate flags. */
+ cFile->flags |= flags;
+
-+ if (cFile->timeout_id == 0)
-+ cFile->timeout_id = g_timeout_add_seconds (
-+ SYNC_TIMEOUT_SECONDS, (GSourceFunc)
-+ sync_push_request, cFile);
++ /* Cancel any pending sync requests. */
++ if (cFile->timeout_id > 0)
++ g_source_remove (cFile->timeout_id);
++
++ /* Wait SYNC_TIMEOUT_SECONDS before we actually sync. */
++ cFile->timeout_id = g_timeout_add_seconds (
++ SYNC_TIMEOUT_SECONDS, (GSourceFunc)
++ sync_push_request, cFile);
+
+ g_async_queue_unlock (cFile->queue);
return SQLITE_OK;
}
-@@ -328,14 +245,24 @@ static int
+@@ -327,15 +246,26 @@ camel_sqlite3_file_xSync (sqlite3_file *
+ static int
camel_sqlite3_vfs_xOpen (sqlite3_vfs *pVfs, const char *zPath, sqlite3_file *pFile, int flags, int *pOutFlags)
{
++ static GStaticRecMutex only_once_lock = G_STATIC_REC_MUTEX_INIT;
static sqlite3_io_methods io_methods = {0};
- struct CamelSqlite3File *cFile;
+ CamelSqlite3File *cFile;
@@ -401,7 +407,7 @@
res = old_vfs->xOpen (old_vfs, zPath, cFile->old_vfs_file, flags, pOutFlags);
-@@ -370,33 +297,23 @@ camel_sqlite3_vfs_xOpen (sqlite3_vfs *pV
+@@ -370,33 +300,23 @@ camel_sqlite3_vfs_xOpen (sqlite3_vfs *pV
return res;
}
@@ -439,7 +445,7 @@
}
#define d(x) if (camel_debug("sqlite")) x
-@@ -453,12 +370,13 @@ cdb_sql_exec (sqlite3 *db, const char* s
+@@ -453,12 +373,13 @@ cdb_sql_exec (sqlite3 *db, const char* s
CamelDB *
camel_db_open (const char *path, CamelException *ex)
{
Index: evolution-data-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/evolution-data-server/F-10/evolution-data-server.spec,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -r1.246 -r1.247
--- evolution-data-server.spec 12 Mar 2009 18:27:21 -0000 1.246
+++ evolution-data-server.spec 13 Mar 2009 16:01:21 -0000 1.247
@@ -29,7 +29,7 @@
Name: evolution-data-server
Version: 2.24.5
-Release: 2%{?dist}
+Release: 3%{?dist}
License: LGPLv2
Group: System Environment/Libraries
Summary: Backend data server for Evolution
@@ -378,6 +378,9 @@
%{_datadir}/gtk-doc/html/libedataserverui
%changelog
+* Fri Mar 13 2009 Matthew Barnes <mbarnes at redhat.com> - 2.25.5-3.fc10
+- Revise patch for RH bug #568332 to match upstream commit.
+
* Thu Mar 12 2009 Matthew Barnes <mbarnes at redhat.com> - 2.25.5-2.fc10
- Add patch for RH bug #568332 (thread leak in fsync() rate limiting).
- Previous message (by thread): rpms/evolution-data-server/devel evolution-data-server-2.25.92-sqlite-fsync-rework.patch, 1.1, 1.2 evolution-data-server.spec, 1.257, 1.258
- Next message (by thread): rpms/ncmpcpp/F-10 .cvsignore, 1.2, 1.3 import.log, 1.1, 1.2 ncmpcpp.spec, 1.1, 1.2 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list