1. 04 2月, 2021 2 次提交
    • D
      xfs: remove xfs_qm_vop_chown_reserve · 5c615f0f
      Darrick J. Wong 提交于
      Now that the only caller of this function is xfs_trans_alloc_ichange,
      just open-code the meat of _chown_reserve in that caller.  Drop the
      (redundant) [ugp]id checks because xfs has a 1:1 relationship between
      quota ids and incore dquots.
      Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: NBrian Foster <bfoster@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      5c615f0f
    • D
      xfs: fix chown leaking delalloc quota blocks when fssetxattr fails · 1aecf373
      Darrick J. Wong 提交于
      While refactoring the quota code to create a function to allocate inode
      change transactions, I noticed that xfs_qm_vop_chown_reserve does more
      than just make reservations: it also *modifies* the incore counts
      directly to handle the owner id change for the delalloc blocks.
      
      I then observed that the fssetxattr code continues validating input
      arguments after making the quota reservation but before dirtying the
      transaction.  If the routine decides to error out, it fails to undo the
      accounting switch!  This leads to incorrect quota reservation and
      failure down the line.
      
      We can fix this by making the reservation function do only that -- for
      the new dquot, it reserves ondisk and delalloc blocks to the
      transaction, and the old dquot hangs on to its incore reservation for
      now.  Once we actually switch the dquots, we can then update the incore
      reservations because we've dirtied the transaction and it's too late to
      turn back now.
      
      No fixes tag because this has been broken since the start of git.
      Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NBrian Foster <bfoster@redhat.com>
      1aecf373
  2. 13 12月, 2020 1 次提交
  3. 07 10月, 2020 1 次提交
  4. 26 9月, 2020 2 次提交
  5. 16 9月, 2020 3 次提交
  6. 29 7月, 2020 16 次提交
  7. 27 5月, 2020 4 次提交
  8. 05 5月, 2020 3 次提交
  9. 29 3月, 2020 1 次提交
  10. 26 3月, 2020 1 次提交
  11. 03 3月, 2020 2 次提交
  12. 14 11月, 2019 4 次提交