This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hurd".

The branch, master has been updated
       via  d68aae2f4e7b019e524cd4a8725e23af95f2185a (commit)
       via  d8b001558675ed84ff33c36457569d3fe35f828a (commit)
       via  490d7581b869cf707eb4a63b323ebd3aa469446b (commit)
      from  ccaa5374c8af09cc47c7111f6335911139df4441 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d68aae2f4e7b019e524cd4a8725e23af95f2185a
Author: Milos Nikic <[email protected]>
Date:   Wed Oct 14 11:01:08 2026 -0700

    ext2fs: Set T_COMMITTED under the journal lock
    
    The commit sets the transaction to T_COMMITTED after the commit block
    is on disk, with the journal lock dropped for the I/O.  The write-hazard
    path reads the committing transaction's state under the lock to decide
    whether a pager write may go home.  The unlocked store is a data race.
    It is harmless in practice: a reader that still sees T_FLUSHING only
    intercepts the write, and the store follows the device flush, so it
    cannot be seen before the commit block is on disk.  Every other state
    change is made under the lock so lets stay consistent and make this one
    do the same as well.
    Message-ID: <[email protected]>

commit d8b001558675ed84ff33c36457569d3fe35f828a
Author: Milos Nikic <[email protected]>
Date:   Wed Oct 14 11:01:07 2026 -0700

    libdiskfs: Commit the journal on a waiting file_sync
    
    fsync calls file_sync with WAIT set and OMIT_METADATA clear, which
    fs.defs defines as syncing the file's metadata too, and POSIX requires
    fsync not to return before the data is on the storage device.  With a
    journal, diskfs_file_update writes the data but leaves the metadata to
    the journal, and diskfs_S_file_sync never asked for a commit.  The new
    inode, size and block map stayed in the running transaction until
    kjournald's next commit, up to five seconds later, so a file could be
    lost in a crash right after a successful fsync.  Creating files,
    running "sync FILE...", which calls fsync, and killing the translator
    at once lost all of them, while "sync -f", which goes through syncfs
    and diskfs_sync_everything, kept them.  This dates from commit
    bc8ac23d6"ext2fs: Add JBD2 journaling to ext2/libdiskfs".
    
    When WAIT is set, open a handle after diskfs_file_update and commit
    it: everything so far is then on disk, the file's metadata included,
    as diskfs_journal_commit_transaction now also waits for the older
    transactions.  This is what ext4's fsync does with
    jbd2_complete_transaction.  The handle is opened only after the data
    writeback: held during it, a commit of its transaction would wait for
    it, and every other start would wait for that commit.  Without a
    journal the handle is NULL and nothing changes.
    Message-ID: <[email protected]>

commit 490d7581b869cf707eb4a63b323ebd3aa469446b
Author: Milos Nikic <[email protected]>
Date:   Wed Oct 14 11:01:06 2026 -0700

    ext2fs: Make a journal commit wait for older transactions
    
    diskfs_journal_commit_transaction promises that the caller's changes
    are on disk when it returns.  A non-empty running transaction commits
    only after the one in flight has finished, so its commit covers all
    older changes.  But an empty running transaction is kept open and the
    call returns at once, while the caller's earlier changes can be in the
    transaction kjournald is committing at that moment.  This happens when
    a caller opens its handle just after kjournald has locked the
    transaction holding its changes.
    
    After committing the running transaction, also wait for the one before
    it.  That wait is satisfied at once after a real commit.  The caller's
    handle is already released, so the wait cannot hold back a drain, and
    a failed commit sets j_last_committed_tid, so it cannot wait forever.
    Message-ID: <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 ext2fs/journal.c      |  9 ++++++++-
 libdiskfs/file-sync.c | 15 +++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
Hurd

Reply via email to