[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#713035: eatmydata bugs



Le vendredi 28 juin 2013 02:21:00, Thomas Preud'homme a écrit :
> Le vendredi 28 juin 2013 00:35:48, Stewart Smith a écrit :
> > Hi!
> > 
> > I'm the upstream eatmydata maintainer.
> > 
> > The aim of libeatmydata is to behave exactly the same but instead have a
> > zero time fsync (and friends). So, if fsync(), msync() and fdatasync()
> > are meant to be cancellation points and I can simulate that in eatmydata
> > with calling pthread_testcancel(), I'd consider it a bug in eatmydata
> > and with luck I'll make another upstream release today with that fixed.
> > 

And here is a proposed patch although I'm sure you don't need it :)

Sorry for the HTML part in the previous message by the way. I don't know why 
that settings changed in my MUA.

Best regards,

Thomas
diff -Nru libeatmydata-26/debian/changelog libeatmydata-26/debian/changelog
--- libeatmydata-26/debian/changelog	2011-02-19 13:28:02.000000000 +0100
+++ libeatmydata-26/debian/changelog	2013-06-28 02:28:17.000000000 +0200
@@ -1,3 +1,11 @@
+libeatmydata (26-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Make fsync, msync and fdatasync cancellation points as required by POSIX
+    (Closes: #713035).
+
+ -- Thomas Preud'homme <robotux@debian.org>  Fri, 28 Jun 2013 02:27:30 +0200
+
 libeatmydata (26-2) unstable; urgency=low
 
   * Switch homepage to launchpad.net/libeatmydata.
diff -Nru libeatmydata-26/debian/patches/Make_sync_fct_cancellation_points.diff libeatmydata-26/debian/patches/Make_sync_fct_cancellation_points.diff
--- libeatmydata-26/debian/patches/Make_sync_fct_cancellation_points.diff	1970-01-01 01:00:00.000000000 +0100
+++ libeatmydata-26/debian/patches/Make_sync_fct_cancellation_points.diff	2013-06-28 02:31:55.000000000 +0200
@@ -0,0 +1,38 @@
+Description: Make (f|m|fdata)sync functions cancellation points
+
+fsync(), msync() and fdatasync() functions are supposed to be cancellation
+points according to POSIX specification, as can be seen in pthreads (7).
+Current libeatmydata does not respect this part of the specification and
+this patch fixes that.
+
+Author: Thomas Preud'homme <robotux@debian.org>
+Bug-Debian: http://bugs.debian.org/713035
+Forwarded: no
+Last-Update: 2013-06-28
+
+--- libeatmydata-26.orig/eatmydata.c
++++ libeatmydata-26/eatmydata.c
+@@ -81,6 +81,7 @@ int fsync(int fd)
+ 		errno= 0;
+ 		return 0;
+ 	}
++	pthread_testcancel();
+ 
+ 	return (*libc_fsync)(fd);
+ }
+@@ -126,6 +127,7 @@ int fdatasync(int fd)
+ 		errno= 0;
+ 		return 0;
+ 	}
++	pthread_testcancel();
+ 
+ 	return (*libc_fdatasync)(fd);
+ }
+@@ -136,6 +138,7 @@ int msync(void *addr, size_t length, int
+ 		errno= 0;
+ 		return 0;
+ 	}
++	pthread_testcancel();
+ 
+ 	return (*libc_msync)(addr, length, flags);
+ }
diff -Nru libeatmydata-26/debian/patches/series libeatmydata-26/debian/patches/series
--- libeatmydata-26/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libeatmydata-26/debian/patches/series	2013-06-28 02:28:53.000000000 +0200
@@ -0,0 +1 @@
+Make_sync_fct_cancellation_points.diff

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: