Applied, thanks! Samuel
Milos Nikic, le mer. 14 oct. 2026 11:01:05 -0700, a ecrit: > Hello, > > With the journal, fsync did not wait for the file's metadata. > diskfs_file_update writes the data and leaves the inode, size and > block map to the journal, but nothing asked for a commit, so they > stayed in the running transaction until kjournald's next commit, up > to five seconds later. Creating files, running "sync FILE..." and > killing the translator at once lost all of them. > > The second patch makes a waiting file_sync commit the journal. It > relies on the first, which makes diskfs_journal_commit_transaction > also wait for the transaction already being committed: without it, > the call could return before the caller's changes were on disk. The > third is unrelated but small: the last journal state change made > without the journal lock now takes it. > > Tested: 100 files created, synced with "sync FILE" and the translator > killed with kill -9 right after; all of them survive the replay. > > Milos > > Milos Nikic (3): > ext2fs: Make a journal commit wait for older transactions > libdiskfs: Commit the journal on a waiting file_sync > ext2fs: Set T_COMMITTED under the journal lock > > ext2fs/journal.c | 9 ++++++++- > libdiskfs/file-sync.c | 15 +++++++++++++++ > 2 files changed, 23 insertions(+), 1 deletion(-) > > -- > 2.56.0 > -- Samuel <D> m'enfin, le 5 juillet, le mec vient visiter le labo... * D a marque d'une croix rouge le 5 juillet sur son agenda <y> niarc niarc niarc <D> cet homme va souffrir <B> c'est donc le 5 juillet qu'il meurt d'un accident de la route écrasé par un truck muni d'un pare buffle -+- #ens-mim - repaire de terroristes -+-
