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  e7be427706fab504d0f370879ae5c8af69802366 (commit)
       via  2f396b8b42e6960e8bcf218ea653f29526085efe (commit)
      from  d68aae2f4e7b019e524cd4a8725e23af95f2185a (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 e7be427706fab504d0f370879ae5c8af69802366
Author: Milos Nikic <[email protected]>
Date:   Mon Oct 19 09:10:27 2026 -0700

    ext2fs: Leave journaled metadata to the journal in diskfs_file_update
    
    Directory edits end with diskfs_file_update, both in ext2fs
    (diskfs_direnter_hard, diskfs_dirremove_hard and
    diskfs_dirrewrite_hard) and in libdiskfs (mkdir, rmdir, rename).  It
    asks the kernel to write back every dirty page of the directory.  With
    directory blocks journaled, those blocks are in the running
    transaction, so each write is only intercepted and copied, after every
    edit.  Over a large Debian upgrade, 84225 of 84505 intercepts were such
    directory blocks.
    
    With a journal, sync only a regular file's pages, which hold data that
    is not journaled.  Do not sync the file's indirect blocks either: they
    are journaled too.  And update the inode without WAIT: a caller that
    needs the metadata durable commits its transaction (file_sync, io_sigio,
    and the RPCs with diskfs_synchronous), and the one that waits without
    committing, diskfs_truncate zeroing the end of the last block, needs
    only that data on disk.  Without a journal nothing changes.
    
    Over the same upgrade, intercepts dropped from 84505 to 294, of which 34
    were directory blocks, with e2fsck clean.  The journal recovered cleanly
    from kill -9 of the translator during rm -rf and tar -xf of a Linux
    kernel tree, after a mix of directory creates, renames and unlinks, and
    from qemu being killed during the upgrade.
    
    With fewer intercepts, the intercept pool shrinks from 2048 to 1024
    chunks: at most 127 were in use during the upgrade, and under 500
    during tar -xf and rm -rf of a Linux kernel tree the remainder is left
    as headroom.
    Message-ID: <[email protected]>

commit 2f396b8b42e6960e8bcf218ea653f29526085efe
Author: Milos Nikic <[email protected]>
Date:   Mon Oct 19 09:10:26 2026 -0700

    ext2fs: Journal directory blocks in writeback mode
    
    Directory blocks are metadata, but ext2fs edits them through the
    directory's file-pager mapping.  The disk cache, which the stop-time
    sweep of journal_get_write_access copies from, never sees those edits,
    so they reached disk outside the journal, through file-pager writes.
    After a crash, a directory entry could then name an inode whose
    creation was never committed.
    
    Add journal entry points for a metadata block whose live bytes are
    outside the disk cache.  journal_get_write_access_external reserves the
    block before the edit, so that pager writes of it are intercepted until
    commit.  The buffer has no image yet; jb_awaiting_data marks it, and the
    sweep leaves it alone.  journal_mark_dirty_external copies the finished
    block into the shadow.  The copy reads the mapping into a scratch buffer
    with hurd_safe_copyin before it takes the journal lock, as a fault under
    the lock would re-enter the journal through the pager.  An intercept
    chunk taken during the edit receives the same image, because the chunk
    backs reads of the block until its home write.
    journal_release_access drops a reservation that never received an
    image, and drops the block from the count of logged blocks that revoke
    records rely on.  When a pager write was intercepted since the
    reservation, that image is the page as it is, and it stays in the
    transaction.  A released buffer is freed at once: the stop-time sweep
    only takes buffers with needs_copy set, which an external reservation
    clears, and an assertion keeps it that way.
    
    journal_get_write_access and journal_get_write_access_external share
    one locked helper, with a flag that selects the disk cache or the
    caller as the source of the copy.  journal_write_payload asserts that
    every buffer has an image.  Directory blocks are now intercepted too,
    so the intercept pool grows from 512 to 2048 chunks: with that, no
    write went past the log during large upgrades or tar -xf and rm -rf of
    a Linux kernel tree.
    
    diskfs_direnter_hard, diskfs_dirremove_hard and diskfs_dirrewrite_hard
    reserve the block before the edit and hand it to the journal before the
    mapping is dropped.  They work inside the RPC's journal handle, which
    journal_thread_transaction returns, and which keeps the transaction open
    from the reservation to the copy.  For EXTEND the block is allocated
    when it is reserved, as diskfs_grow only makes room for it.
    Message-ID: <[email protected]>

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

Summary of changes:
 ext2fs/dir.c     | 126 ++++++++++++++++++++++++++++++++++++++++++---
 ext2fs/journal.c | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
 ext2fs/journal.h |  24 +++++++++
 ext2fs/pager.c   |  42 ++++++++++-----
 4 files changed, 318 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
Hurd

Reply via email to