1. 15 Oct, 2024 1 commit
  2. 11 Oct, 2024 1 commit
  3. 09 Oct, 2024 2 commits
    • Andrew Kreimer's avatar
      xfs: fix a typo · 77bfe1b1
      Andrew Kreimer authored
      Fix a typo in comments.
      Signed-off-by: default avatarAndrew Kreimer <algonell@gmail.com>
      Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarCarlos Maiolino <cem@kernel.org>
      77bfe1b1
    • Brian Foster's avatar
      xfs: don't free cowblocks from under dirty pagecache on unshare · 4390f019
      Brian Foster authored
      fallocate unshare mode explicitly breaks extent sharing. When a
      command completes, it checks the data fork for any remaining shared
      extents to determine whether the reflink inode flag and COW fork
      preallocation can be removed. This logic doesn't consider in-core
      pagecache and I/O state, however, which means we can unsafely remove
      COW fork blocks that are still needed under certain conditions.
      
      For example, consider the following command sequence:
      
      xfs_io -fc "pwrite 0 1k" -c "reflink <file> 0 256k 1k" \
      	-c "pwrite 0 32k" -c "funshare 0 1k" <file>
      
      This allocates a data block at offset 0, shares it, and then
      overwrites it with a larger buffered write. The overwrite triggers
      COW fork preallocation, 32 blocks by default, which maps the entire
      32k write to delalloc in the COW fork. All but the shared block at
      offset 0 remains hole mapped in the data fork. The unshare command
      redirties and flushes the folio at offset 0, removing the only
      shared extent from the inode. Since the inode no longer maps shared
      extents, unshare purges the COW fork before the remaining 28k may
      have written back.
      
      This leaves dirty pagecache backed by holes, which writeback quietly
      skips, thus leaving clean, non-zeroed pagecache over holes in the
      file. To verify, fiemap shows holes in the first 32k of the file and
      reads return different data across a remount:
      
      $ xfs_io -c "fiemap -v" <file>
      <file>:
       EXT: FILE-OFFSET      BLOCK-RANGE      TOTAL FLAGS
         ...
         1: [8..511]:        hole               504
         ...
      $ xfs_io -c "pread -v 4k 8" <file>
      00001000:  cd cd cd cd cd cd cd cd  ........
      $ umount <mnt>; mount <dev> <mnt>
      $ xfs_io -c "pread -v 4k 8" <file>
      00001000:  00 00 00 00 00 00 00 00  ........
      
      To avoid this problem, make unshare follow the same rules used for
      background cowblock scanning and never purge the COW fork for inodes
      with dirty pagecache or in-flight I/O.
      
      Fixes: 46afb062 ("xfs: only flush the unshared range in xfs_reflink_unshare")
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: default avatarCarlos Maiolino <cem@kernel.org>
      4390f019
  4. 07 Oct, 2024 13 commits
  5. 06 Oct, 2024 20 commits
  6. 05 Oct, 2024 3 commits
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2024-10-05' of git://evilpiepirate.org/bcachefs · 8f602276
      Linus Torvalds authored
      Pull bcachefs fixes from Kent Overstreet:
       "A lot of little fixes, bigger ones include:
      
         - bcachefs's __wait_on_freeing_inode() was broken in rc1 due to vfs
           changes, now fixed along with another lost wakeup
      
         - fragmentation LRU fixes; fsck now repairs successfully (this is the
           data structure copygc uses); along with some nice simplification.
      
         - Rework logged op error handling, so that if logged op replay errors
           (due to another filesystem error) we delete the logged op instead
           of going into an infinite loop)
      
         - Various small filesystem connectivitity repair fixes"
      
      * tag 'bcachefs-2024-10-05' of git://evilpiepirate.org/bcachefs:
        bcachefs: Rework logged op error handling
        bcachefs: Add warn param to subvol_get_snapshot, peek_inode
        bcachefs: Kill snapshot arg to fsck_write_inode()
        bcachefs: Check for unlinked, non-empty dirs in check_inode()
        bcachefs: Check for unlinked inodes with dirents
        bcachefs: Check for directories with no backpointers
        bcachefs: Kill alloc_v4.fragmentation_lru
        bcachefs: minor lru fsck fixes
        bcachefs: Mark more errors AUTOFIX
        bcachefs: Make sure we print error that causes fsck to bail out
        bcachefs: bkey errors are only AUTOFIX during read
        bcachefs: Create lost+found in correct snapshot
        bcachefs: Fix reattach_inode()
        bcachefs: Add missing wakeup to bch2_inode_hash_remove()
        bcachefs: Fix trans_commit disk accounting revert
        bcachefs: Fix bch2_inode_is_open() check
        bcachefs: Fix return type of dirent_points_to_inode_nowarn()
        bcachefs: Fix bad shift in bch2_read_flag_list()
      8f602276
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.12a-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · fc20a3e5
      Linus Torvalds authored
      Pull xen fix from Juergen Gross:
       "Fix Xen config issue introduced in the merge window"
      
      * tag 'for-linus-6.12a-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: Fix config option reference in XEN_PRIVCMD definition
      fc20a3e5
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus-5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · fdd0a94d
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Fix some ext4 bugs and regressions relating to oneline resize and fast
        commits"
      
      * tag 'ext4_for_linus-5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix off by one issue in alloc_flex_gd()
        ext4: mark fc as ineligible using an handle in ext4_xattr_set()
        ext4: use handle to mark fc as ineligible in __track_dentry_update()
      fdd0a94d