1. 07 7月, 2022 3 次提交
  2. 21 4月, 2022 1 次提交
  3. 11 4月, 2022 1 次提交
  4. 23 10月, 2021 1 次提交
  5. 20 10月, 2021 1 次提交
  6. 20 8月, 2021 5 次提交
  7. 19 8月, 2021 1 次提交
  8. 10 8月, 2021 1 次提交
  9. 16 7月, 2021 1 次提交
    • D
      xfs: check for sparse inode clusters that cross new EOAG when shrinking · da062d16
      Darrick J. Wong 提交于
      While running xfs/168, I noticed occasional write verifier shutdowns
      involving inodes at the very end of the filesystem.  Existing inode
      btree validation code checks that all inode clusters are fully contained
      within the filesystem.
      
      However, due to inadequate checking in the fs shrink code, it's possible
      that there could be a sparse inode cluster at the end of the filesystem
      where the upper inodes of the cluster are marked as holes and the
      corresponding blocks are free.  In this case, the last blocks in the AG
      are listed in the bnobt.  This enables the shrink to proceed but results
      in a filesystem that trips the inode verifiers.  Fix this by disallowing
      the shrink.
      Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: NGao Xiang <hsiangkao@linux.alibaba.com>
      da062d16
  10. 18 6月, 2021 1 次提交
  11. 09 6月, 2021 1 次提交
    • D
      xfs: drop the AGI being passed to xfs_check_agi_freecount · 9ba0889e
      Dave Chinner 提交于
      From: Dave Chinner <dchinner@redhat.com>
      
      Stephen Rothwell reported this compiler warning from linux-next:
      
      fs/xfs/libxfs/xfs_ialloc.c: In function 'xfs_difree_finobt':
      fs/xfs/libxfs/xfs_ialloc.c:2032:20: warning: unused variable 'agi' [-Wunused-variable]
       2032 |  struct xfs_agi   *agi = agbp->b_addr;
      
      Which is fallout from agno -> perag conversions that were done in
      this function. xfs_check_agi_freecount() is the only user of "agi"
      in xfs_difree_finobt() now, and it only uses the agi to get the
      current free inode count. We hold that in the perag structure, so
      there's not need to directly reference the raw AGI to get this
      information.
      
      The btree cursor being passed to xfs_check_agi_freecount() has a
      reference to the perag being operated on, so use that directly in
      xfs_check_agi_freecount() rather than passing an AGI.
      
      Fixes: 7b13c515 ("xfs: use perag for ialloc btree cursors")
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NCarlos Maiolino <cmaiolino@redhat.com>
      Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
      Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
      9ba0889e
  12. 02 6月, 2021 10 次提交
  13. 26 3月, 2021 1 次提交
  14. 17 12月, 2020 1 次提交
  15. 13 12月, 2020 5 次提交
  16. 16 9月, 2020 2 次提交
  17. 27 8月, 2020 1 次提交
    • B
      xfs: fix off-by-one in inode alloc block reservation calculation · 657f1019
      Brian Foster 提交于
      The inode chunk allocation transaction reserves inobt_maxlevels-1
      blocks to accommodate a full split of the inode btree. A full split
      requires an allocation for every existing level and a new root
      block, which means inobt_maxlevels is the worst case block
      requirement for a transaction that inserts to the inobt. This can
      lead to a transaction block reservation overrun when tmpfile
      creation allocates an inode chunk and expands the inobt to its
      maximum depth. This problem has been observed in conjunction with
      overlayfs, which makes frequent use of tmpfiles internally.
      
      The existing reservation code goes back as far as the Linux git repo
      history (v2.6.12). It was likely never observed as a problem because
      the traditional file/directory creation transactions also include
      worst case block reservation for directory modifications, which most
      likely is able to make up for a single block deficiency in the inode
      allocation portion of the calculation. tmpfile support is relatively
      more recent (v3.15), less heavily used, and only includes the inode
      allocation block reservation as tmpfiles aren't linked into the
      directory tree on creation.
      
      Fix up the inode alloc block reservation macro and a couple of the
      block allocator minleft parameters that enforce an allocation to
      leave enough free blocks in the AG for a full inobt split.
      Signed-off-by: NBrian Foster <bfoster@redhat.com>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      657f1019
  18. 14 7月, 2020 1 次提交
    • G
      xfs: get rid of unnecessary xfs_perag_{get,put} pairs · 92a00544
      Gao Xiang 提交于
      In the course of some operations, we look up the perag from
      the mount multiple times to get or change perag information.
      These are often very short pieces of code, so while the
      lookup cost is generally low, the cost of the lookup is far
      higher than the cost of the operation we are doing on the
      perag.
      
      Since we changed buffers to hold references to the perag
      they are cached in, many modification contexts already hold
      active references to the perag that are held across these
      operations. This is especially true for any operation that
      is serialised by an allocation group header buffer.
      
      In these cases, we can just use the buffer's reference to
      the perag to avoid needing to do lookups to access the
      perag. This means that many operations don't need to do
      perag lookups at all to access the perag because they've
      already looked up objects that own persistent references
      and hence can use that reference instead.
      
      Cc: Dave Chinner <dchinner@redhat.com>
      Cc: "Darrick J. Wong" <darrick.wong@oracle.com>
      Signed-off-by: NGao Xiang <hsiangkao@redhat.com>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      92a00544
  19. 19 3月, 2020 2 次提交