author | Alberto Bertogli
<albertito@blitiri.com.ar> 2009-03-29 02:06:40 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2009-03-29 02:33:22 UTC |
parent | 6e8652bb2d1e40dd8ce59ac4a8ca4891f0f06ab9 |
UPGRADING | +4 | -0 |
libjio/trans.c | +3 | -0 |
diff --git a/UPGRADING b/UPGRADING index 72b9c9e..2d3f8fd 100644 --- a/UPGRADING +++ b/UPGRADING @@ -11,6 +11,10 @@ take much. If it's mandatory, it will be noted. If you want to see what motivated the changes, see the changelog or just ask. +0.24 -> 0.25 +* It is no longer necessary to pass O_SYNC to jopen() if lingering + transactions are not in use. + 0.22 -> 0.24 * The return values of jfsck() have changed, so applications using it need to be recompiled. diff --git a/libjio/trans.c b/libjio/trans.c index bd0eab5..8f003d4 100644 --- a/libjio/trans.c +++ b/libjio/trans.c @@ -416,6 +416,9 @@ ssize_t jtrans_commit(struct jtrans *ts) ts->fs->ltrans = linger; pthread_mutex_unlock(&(ts->fs->ltlock)); } else { + if (fdatasync(ts->fs->fd) != 0) + goto rollback_exit; + /* the transaction has been applied, so we cleanup and remove * it from the disk */ unlink(name);