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

Matthew Barnes mbarnes at fedoraproject.org
Fri Mar 13 16:01:24 UTC 2009


Author: mbarnes

Update of /cvs/pkgs/rpms/evolution-data-server/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13335

Modified Files:
	evolution-data-server-2.25.92-sqlite-fsync-rework.patch 
	evolution-data-server.spec 
Log Message:

* Fri Mar 13 2009 Matthew Barnes <mbarnes at redhat.com> - 2.25.92-4.fc11
- Revise patch for RH bug #568332 to match upstream commit.


evolution-data-server-2.25.92-sqlite-fsync-rework.patch:

Index: evolution-data-server-2.25.92-sqlite-fsync-rework.patch
===================================================================
RCS file: /cvs/pkgs/rpms/evolution-data-server/devel/evolution-data-server-2.25.92-sqlite-fsync-rework.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- evolution-data-server-2.25.92-sqlite-fsync-rework.patch	12 Mar 2009 18:27:23 -0000	1.1
+++ evolution-data-server-2.25.92-sqlite-fsync-rework.patch	13 Mar 2009 16:01:21 -0000	1.2
@@ -1,7 +1,7 @@
 diff -up evolution-data-server-2.25.92/camel/camel-db.c.sqlite-fsync-rework evolution-data-server-2.25.92/camel/camel-db.c
 --- evolution-data-server-2.25.92/camel/camel-db.c.sqlite-fsync-rework	2009-02-04 12:28:12.000000000 -0500
-+++ evolution-data-server-2.25.92/camel/camel-db.c	2009-03-12 14:25:00.000000000 -0400
-@@ -36,239 +36,114 @@
++++ evolution-data-server-2.25.92/camel/camel-db.c	2009-03-13 11:59:49.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;
 -
@@ -67,12 +67,13 @@
  {
 -	int sync_flags = 0;
 -	sync_queue_data *data;
--
--	g_return_val_if_fail (pFile != NULL, NULL);
--	g_return_val_if_fail (sync_queue != NULL, NULL);
 +	gpointer data;
 +	gint flags = 0;
  
+-	g_return_val_if_fail (pFile != NULL, NULL);
+-	g_return_val_if_fail (sync_queue != NULL, NULL);
++	g_async_queue_ref (cFile->queue);
+ 
 -	LockQueue ();
 -	data = g_hash_table_lookup (sync_queue, pFile);
 -	if (data) {
@@ -101,8 +102,7 @@
 -		g_free (data);
 -	}
 -	UnlockQueue ();
-+	g_async_queue_ref (cFile->queue);
- 
+-
 -	return NULL;
 -}
 +	while (TRUE) {
@@ -176,10 +176,7 @@
 -			data->sync_flags = data->sync_flags | flags;
 -		} else {
 -			data->sync_flags = data->sync_flags | flags;
-+	/* One more for the road? */
-+	if (getenv ("CAMEL_NO_SYNC_ON_CLOSE") == NULL)
-+		call_old_file_Sync (cFile, flags);
- 
+-
 -			/* reschedule */
 -			g_source_remove (data->timeout_source);
 -			data->timeout_source = g_timeout_add (SYNC_TIMEOUT, prepare_to_run_sync_in_thread, pFile);
@@ -189,11 +186,14 @@
 -		data->sync_flags = flags;
 -		data->running_thread = NULL;
 -		data->timeout_source = g_timeout_add (SYNC_TIMEOUT, prepare_to_run_sync_in_thread, pFile);
-+	g_async_queue_unref (cFile->queue);
++	/* One more for the road? */
++	if (flags != 0 && 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/devel/evolution-data-server.spec,v
retrieving revision 1.257
retrieving revision 1.258
diff -u -r1.257 -r1.258
--- evolution-data-server.spec	12 Mar 2009 18:34:19 -0000	1.257
+++ evolution-data-server.spec	13 Mar 2009 16:01:21 -0000	1.258
@@ -31,7 +31,7 @@
 
 Name: evolution-data-server
 Version: 2.25.92
-Release: 3%{?dist}
+Release: 4%{?dist}
 Group: System Environment/Libraries
 Summary: Backend data server for Evolution
 License: LGPLv2+
@@ -389,6 +389,9 @@
 %{_datadir}/gtk-doc/html/libedataserverui
 
 %changelog
+* Fri Mar 13 2009 Matthew Barnes <mbarnes at redhat.com> - 2.25.92-4.fc11
+- Revise patch for RH bug #568332 to match upstream commit.
+
 * Thu Mar 12 2009 Matthew Barnes <mbarnes at redhat.com> - 2.25.92-3.fc11
 - Add patch for RH bug #568332 (thread leak in fsync() rate limiting).
 




More information about the fedora-extras-commits mailing list