author | Alberto Bertogli
<albertito@gmail.com> 2004-05-05 18:08:22 UTC |
committer | Alberto Bertogli
<albertito@gmail.com> 2007-07-15 12:44:27 UTC |
parent | 041ce8cb7b0b4deb9559ce97e30937f660e4e725 |
libjio.c | +7 | -0 |
diff --git a/libjio.c b/libjio.c index e6f88fc..4cc25ae 100644 --- a/libjio.c +++ b/libjio.c @@ -735,6 +735,13 @@ int jfsck(const char *name, struct jfsck_result *res) } closedir(dir); + /* rewrite the lockfile, writing the new maxtid on it, so that when we + * rollback a transaction it doesn't step over existing ones */ + rv = spwrite(fs.jfd, &maxtid, sizeof(maxtid), 0); + if (rv != sizeof(maxtid)) { + return J_ENOMEM; + } + /* we loop all the way up to the max transaction id */ for (i = 1; i <= maxtid; i++) { curts = malloc(sizeof(struct jtrans));