1. 23 Apr, 2024 38 commits
  2. 22 Apr, 2024 2 commits
    • Christoph Hellwig's avatar
      xfs: reinstate delalloc for RT inodes (if sb_rextsize == 1) · 6a94b1ac
      Christoph Hellwig authored
      Commit aff3a9ed ("xfs: Use preallocation for inodes with extsz
      hints") disabled delayed allocation for all inodes with extent size
      hints due a data exposure problem.  It turns out we fixed this data
      exposure problem since by always creating unwritten extents for
      delalloc conversions due to more data exposure problems, but the
      writeback path doesn't actually support extent size hints when
      converting delalloc these days, which probably isn't a problem given
      that people using the hints know what they get.
      
      However due to the way how xfs_get_extsz_hint is implemented, it
      always claims an extent size hint for RT inodes even if the RT
      extent size is a single FSB.  Due to that the above commit effectively
      disabled delalloc support for RT inodes.
      
      Switch xfs_get_extsz_hint to return 0 for this case and work around
      that in a few places to reinstate delalloc support for RT inodes on
      file systems with an sb_rextsize of 1.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      6a94b1ac
    • Christoph Hellwig's avatar
      xfs: stop the steal (of data blocks for RT indirect blocks) · bd1753d8
      Christoph Hellwig authored
      When xfs_bmap_del_extent_delay has to split an indirect block it tries
      to steal blocks from the the part that gets unmapped to increase the
      indirect block reservation that now needs to cover for two extents
      instead of one.
      
      This works perfectly fine on the data device, where the data and
      indirect blocks come from the same pool.  It has no chance of working
      when the inode sits on the RT device.  To support re-enabling delalloc
      for inodes on the RT device, make this behavior conditional on not
      being for rt extents.
      
      Note that split of delalloc extents should only happen on writeback
      failure, as for other kinds of hole punching we first write back all
      data and thus convert the delalloc reservations covering the hole to
      a real allocation.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
      Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
      bd1753d8