--- linux-2.4-ext3merge/fs/jbd/transaction.c.=K0009=.orig Wed Nov 6 15:50:17 2002 +++ linux-2.4-ext3merge/fs/jbd/transaction.c Fri Nov 8 12:49:30 2002 @@ -1465,8 +1465,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.=K0009=.orig Wed Nov 6 15:50:17 2002 +++ linux-2.4-ext3merge/include/linux/jbd.h Mon Nov 11 13:11:01 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 */ };