1. 16 May, 2018 9 commits
  2. 10 May, 2018 26 commits
  3. 09 May, 2018 5 commits
    • Darrick J. Wong's avatar
      xfs: bmap debugging should never panic the system · cec57256
      Darrick J. Wong authored
      Don't panic() the system if the bmap records are garbage, just call
      ASSERT which gives us the same backtrace but enables developers to
      control if the system goes down or not.  This makes debugging with
      generic/388 much easier because it won't reboot the machine midway
      through a run just because btree_read_bufl returns EIO when the fs has
      already shut down.
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
      cec57256
    • Brian Foster's avatar
      xfs: defer agfl frees from directory op transactions · 8804630e
      Brian Foster authored
      Directory operations can perform block allocations as entries are
      added/removed from directories. Defer AGFL block frees from the
      remaining directory operation transactions. This covers the hard
      link, remove and rename operations.
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      8804630e
    • Brian Foster's avatar
      xfs: defer frees from common inode allocation paths · 8b922f0e
      Brian Foster authored
      Inode allocation can require block allocation for physical inode
      chunk allocation, inode btree record insertion, and/or directory
      block allocation for entry insertion. Any of these block allocation
      requests can require AGFL fixups prior to the actual allocation.
      Update the common file creation transacions to defer AGFL frees from
      these contexts to avoid too much log reservation consumption
      per-transaction.
      
      Since these transactions are already passed down through the btree
      cursors and da_args structure, this simply requires to attach dfops
      to the transaction. Note that this covers tr_create, tr_mkdir and
      tr_symlink. Other transactions such as tr_create_tmpfile do not
      already make use of deferred operations and so are left alone for
      the time being.
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      8b922f0e
    • Brian Foster's avatar
      xfs: defer agfl frees from inode inactivation · 658f8f95
      Brian Foster authored
      XFS inode chunks are already freed via deferred operations (which
      now also defer AGFL block frees), but inode btree blocks are freed
      directly in the associated context. This has been known to lead to
      log reservation overruns in particular workloads where an inobt
      block free may require several AGFL block frees (and thus several
      allocation btree modifications) before the inobt block itself is
      actually freed.
      
      To avoid this problem, defer the frees of any AGFL blocks before the
      inobt block free takes place. This requires passing the dfops from
      xfs_inactive_ifree() down through the inobt ->[alloc|free]_block()
      callouts, which essentially only requires to attach the dfops to the
      transaction since it is already carried all the way through to the
      inobt update and allocation.
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      658f8f95
    • Brian Foster's avatar
      xfs: defer agfl block frees from deferred ops processing context · 2bc5eba8
      Brian Foster authored
      Now that AGFL block frees are deferred when dfops is set in the
      transaction, start deferring AGFL block frees from contexts that are
      known to push the limits of existing log reservations.
      
      The first such context is deferred operation processing itself. This
      primarily targets deferred extent frees (such as file extents and
      inode chunks), but in doing so covers all allocation operations that
      occur in deferred operation processing context.
      
      Update xfs_defer_finish() to set and reset ->t_agfl_dfops across the
      processing sequence. This means that any AGFL block frees due to
      allocation events result in the addition of new EFIs to the dfops
      rather than being processed immediately. xfs_defer_finish() rolls
      the transaction at least once more to process the frees of the AGFL
      blocks back to the allocation btrees and returns once the AGFL is
      rectified.
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      2bc5eba8