--- linux-2.4-ext3merge/fs/jbd/transaction.c.=K0012=.orig Wed Nov 13 18:12:15 2002 +++ linux-2.4-ext3merge/fs/jbd/transaction.c Wed Nov 13 18:19:48 2002 @@ -1447,8 +1447,13 @@ * Special case: JFS_SYNC synchronous updates require us * to wait for the commit to complete. */ - if (handle->h_sync && !(current->flags & PF_MEMALLOC)) + if (handle->h_sync && !(current->flags & PF_MEMALLOC)) { log_wait_commit(journal, tid); + if (handle->h_flush) { + while (tid_geq(journal->j_tail_sequence, tid)) + log_do_checkpoint(journal, 1); + } + } } kfree(handle); return err; --- linux-2.4-ext3merge/include/linux/jbd.h.=K0012=.orig Wed Nov 13 18:09:53 2002 +++ linux-2.4-ext3merge/include/linux/jbd.h Wed Nov 13 18:22:13 2002 @@ -302,6 +302,7 @@ /* Flags */ unsigned int h_sync: 1; /* sync-on-close */ + unsigned int h_flush: 1; /* flush/checkpoint-on-close */ unsigned int h_jdata: 1; /* force data journaling */ unsigned int h_aborted: 1; /* fatal error on handle */ };