commit 80a902981843f3579fcb36d4123c5f00d42ce6d4 Author: Alberto Bertogli Date: Sun Mar 29 01:15:46 2009 -0300 libjio.h: Remove C++ considerations In C++ source, doing the 'extern "C"' is a responsibility of the importer, it has nothing to do inside our C header. This reverts commit b903b5e. Signed-off-by: Alberto Bertogli commit 8b08cec2ee53c7e5e0eb7d5f359e7dde1b254bcb Author: Alberto Bertogli Date: Sun Mar 29 01:09:14 2009 -0300 Use posix_fadvise() in jtrans_add() When adding an operation to a transaction, it's highly likely that the affected region will be read when committing. This patch lets the kernel know that using posix_fadvise(), so it can take actions based on that. Because posix_fadvise() was included in SUSv3 and so far we've relied just on SUSv2, we introduce a new header, compat.h, to provide a stub for that function so the library can be built in systems that do not implement it. Signed-off-by: Alberto Bertogli commit 70ee2209c331e69bda9a6a7d02a138aac56d0797 Author: Alberto Bertogli Date: Sun Mar 29 00:53:57 2009 -0300 Fix "committed" typos Signed-off-by: Alberto Bertogli commit 2383e7c5193ac91f2bbc6c2abcdcaa43cf7b9d94 Author: Alberto Bertogli Date: Sun Mar 29 00:48:54 2009 -0300 Improve wording and format in the UPGRADING document Signed-off-by: Alberto Bertogli commit 0fd8c17c54bcbdae8480ed91a1ba8dbb2bb5f203 Author: Alberto Bertogli Date: Sat Mar 28 23:06:40 2009 -0300 Call fdatasync() after writing to the real file If O_SYNC was not passed to jopen(), then we could loose data because jtrans_commit() assumes writes to the file are synchronous. That behaviour was undocumented, so the user could have assumed O_SYNC was not necessary. This patch implements a much more sane semantic by calling fdatasync() on the file fd after writing the transaction when lingering transactions are not enabled, avoiding the need to open the file with O_SYNC. Signed-off-by: Alberto Bertogli commit 6e8652bb2d1e40dd8ce59ac4a8ca4891f0f06ab9 Author: Alberto Bertogli Date: Sat Mar 28 02:07:31 2009 -0300 Move the C library files to a new directory This patch moves the C library files to a new directory, called libjio, to make the directory layout more tidy and to simplify the build system. As a side-effect of the move, the preloader library now has its own Makefile. Signed-off-by: Alberto Bertogli commit f949b1d28af9394f734f3e5243a3a6d58f850aca Author: Alberto Bertogli Date: Sat Mar 28 01:34:11 2009 -0300 Cleanup the samples This patch does several cleanups to the samples: - Replace the ugly build and clean scripts with a Makefile. - Several style fixes. - Do not open the files with O_SYNC. - Make them write to different files. Signed-off-by: Alberto Bertogli commit c7fbc9989650aa923468cdbbed2ce12589cfdec9 Author: Alberto Bertogli Date: Sat Mar 28 01:04:33 2009 -0300 Performance tests cleanups This patch brings the performance tests more up to date, by doing several cleanups: - Fix the Makefile so it's more correct when building and linking. - Remove the streaming test, and rename the parallel test to performance. The streaming test is exactly the same test as the parallel with one thread, so why keep both around? - Fix some comments and minor style changes. - Expand the help. - Mark the functions and static data as static. - Use proper types (unsigned long, ssize_t) instead of int. - Add checks for the return of some calls like malloc(). - The blocksize is now passed in Kb, to make it easier to use bigger sizes. - Do not open the file O_SYNC, it makes no sense. - Run jfsck after all the writes, and verify it went well. Signed-off-by: Alberto Bertogli commit f5ba4fabcc031f353ab627fc59f7cd6d85230f41 Author: Alberto Bertogli Date: Sat Mar 28 00:39:55 2009 -0300 Remove tests/README, it offers no useful information Signed-off-by: Alberto Bertogli commit d1576eb75555c17262c2e8c35021059e51d63bd9 Author: Alberto Bertogli Date: Sat Mar 28 00:25:22 2009 -0300 Rename the "auto" test to "behaviour" The "auto" test checks if the library behaves as expected, so it makes sense to rename it to a clearer name. Signed-off-by: Alberto Bertogli commit 9b563e43633ec4fcfc0cd3b24b97e11f2faa572c Author: Alberto Bertogli Date: Sat Mar 28 00:22:51 2009 -0300 Makefile: Use LDFLAGS for linking Signed-off-by: Alberto Bertogli commit 9d58ae91df2115d110e41c21e9237b8e503331e5 Author: Alberto Bertogli Date: Sat Mar 28 00:22:15 2009 -0300 Makefile: Use only the needed LFS CFLAGS Signed-off-by: Alberto Bertogli commit 34e078aecbdab20c9ad6ead368fa6f216b35aa43 Author: Alberto Bertogli Date: Sat Mar 28 00:17:58 2009 -0300 libjio.h: Fix LFS check The appropriate check for LFS support is to see if _LARGEFILE_SOURCE is defined. Signed-off-by: Alberto Bertogli commit 3e212f5ec9c09e2959eb7c29701ce3c9193161bc Author: Alberto Bertogli Date: Sat Mar 28 00:14:20 2009 -0300 Add a stress test This patch adds a stress tester. It's not a traditional stress test like fsx (which can be used to test libjio using the preloading library), but uses fault injection to check how the library behaves under random failures. Signed-off-by: Alberto Bertogli commit 25424aaa368622580a206ddd8f3ba2e5ecddf75d Author: Alberto Bertogli Date: Thu Mar 26 21:57:03 2009 -0300 tests/auto: Don't keep running when libfiu is not available When libfiu is not available, re-raise the exception after printing the message. While at it, fix a small (related) documentation mismatch: FI=1 should be used to build with fault injection support, not FIU=1. Signed-off-by: Alberto Bertogli commit ee10f2610c4a51c37ca00d31fd6e11a08351d4f1 Author: Alberto Bertogli Date: Thu Mar 26 21:34:19 2009 -0300 Add Python 3 bindings This patch adds Python 3 bindings, based on Python 2 bindings. Signed-off-by: Alberto Bertogli commit ec2368fcaacd4a325180fbd29eb526c6f8304891 Author: Alberto Bertogli Date: Thu Mar 26 21:39:51 2009 -0300 python2: Style changes Signed-off-by: Alberto Bertogli commit f63933aad2a2b54458524a1b2cc810fd259ebaf1 Author: Alberto Bertogli Date: Thu Mar 26 20:27:05 2009 -0300 Bring the INSTALL document more up to date Signed-off-by: Alberto Bertogli commit 93201c5517f8d992a25bead855ff2b0a4196571e Author: Alberto Bertogli Date: Thu Mar 26 20:15:57 2009 -0300 Rename python bindings to "python2" Signed-off-by: Alberto Bertogli commit 1dfdcca641e402ff1e518ecce57f93f02e83fcb3 Author: Alberto Bertogli Date: Mon Mar 9 04:06:00 2009 -0200 Remove recovery tests They're not really useful anymore, it makes no sense to keep them around. Signed-off-by: Alberto Bertogli commit 4f92a29cbc6511bb44baf2ec6099bebec907f229 Author: Alberto Bertogli Date: Mon Mar 9 04:02:56 2009 -0200 Add behaviour tests This patch adds a suite of tests that check the library's behaviour. It's written in Python, so it uses the Python bindings. It has three different "test suites", one of them uses the fault injection support incorporated in a previous patch, so it depends on libfiu being installed and libjio having been built with FI=1. The other two test suites can be run without libfiu. Signed-off-by: Alberto Bertogli commit 0e023680595121dcf0c8140b1563ada22b4d237c Author: Alberto Bertogli Date: Mon Mar 2 03:54:34 2009 -0200 Add support for libfiu, a library for fault injection This patch implements support for libfiu, which is a library for fault injection. It adds several "failure points" inside the code, that can (and will) be used, in the future, for testing purposes. In order to avoid a build-time dependency on libfiu, it also adds a special libfiu local header to the tree. Signed-off-by: Alberto Bertogli commit a49c332cb2d493ef61ba662fcdcfab06abaee39c Author: Alberto Bertogli Date: Thu Mar 26 19:36:10 2009 -0300 manpage: Fix small typo Signed-off-by: Alberto Bertogli commit 936d9f0de47768ee47318078bb738e283ba99cd4 Author: Alberto Bertogli Date: Wed Mar 18 12:41:19 2009 -0300 Update the manpage The manpage was out of date, leaving some functions undocumented and, in some cases, not matching the real API. This patch fixes them by bringing the manpage up to date, and while at it also improves some of the writing. Thanks to Chris Riddoch who reported the documentation mismatches. Signed-off-by: Alberto Bertogli commit 5ad275eda02e03cbdc5b103b4c5b5933e4cc4015 Author: Alberto Bertogli Date: Wed Mar 18 01:41:32 2009 -0300 Add samples' binaries to .gitignore Signed-off-by: Alberto Bertogli commit fa198ffb04d179ff6ba1f35a17c1338f9ab23010 Author: Alberto Bertogli Date: Wed Mar 18 01:39:17 2009 -0300 samples/full.c: Bring it up to date with API changes This patch fixes two small API-related issues in samples/full.c: the introduction of the jdir parameter (in this case, NULL), and the fact that we assume read-only mode unless O_RDWR is specified. Thanks to Chris Riddoch for the bug report. Signed-off-by: Alberto Bertogli commit 29a7cd7f4f0520ce84deb1b4a8336556e5418a59 Author: Alberto Bertogli Date: Wed Mar 18 01:38:46 2009 -0300 Fix samples' build script Thanks to Chris Riddoch for the bug report. Signed-off-by: Alberto Bertogli commit f7620acdac624642f286d3c37bad6f85bcf97f87 Author: Alberto Bertogli Date: Wed Mar 18 01:36:26 2009 -0300 Link the shared library against pthread Otherwise, we're forcing the user to link against it even if it doesn't use it, which seems misleading. Thanks to Chris Riddoch for the bug report. Signed-off-by: Alberto Bertogli commit 583b8987398374738a620a0bffe5cbf94def26f4 Author: Alberto Bertogli Date: Sun Mar 15 20:56:56 2009 -0300 Place libjio under public domain While I think OSL 3.0 is nice, I think public domain is nicer in this case. As I am the sole copyright owner, it's ok for me to change the license. Signed-off-by: Alberto Bertogli commit fe4ca8d2c200493957fea75ad58915f56aee8326 Author: Alberto Bertogli Date: Mon Mar 9 03:21:53 2009 -0200 jtrans_rollback(): Set the new transaction's numops The number of operations is not properly set in the new transaction. It used to work fine just by chance (most code doesn't look into numops), but the previous patch uncovered this problem. This patch fixes it by setting numops appropriately. Signed-off-by: Alberto Bertogli commit 385f81d3862354c8522aedf06da20a3a8545833f Author: Alberto Bertogli Date: Sun Mar 8 23:30:17 2009 -0200 check.c: Improve comments Signed-off-by: Alberto Bertogli commit 94fef4e511d2b39590d9c5fa14c5ba7832465516 Author: Alberto Bertogli Date: Sun Mar 8 23:14:31 2009 -0200 jfsck(): Check there's enough room for the checksum before computing it Before computing the checksum in jfsck(), see if the file is long enough to contain it. Otherwise, if the transaction file was truncated, we would check the checksum anyways. This is usually not a problem because the checksums shouldn't match, but it's better to play safe. Also, it properly report such transactions as broken instead of corrupt. Signed-off-by: Alberto Bertogli