1. 03 Feb, 2021 2 commits
    • Darrick J. Wong's avatar
      xfs: reduce quota reservation when doing a dax unwritten extent conversion · b8055ed6
      Darrick J. Wong authored
      In commit 3b0fe478, we reduced the free space requirement to
      perform a pre-write unwritten extent conversion on an S_DAX file.  Since
      we're not actually allocating any space, the logic goes, we only need
      enough reservation to handle shape changes in the bmbt.
      
      The same logic should have been applied to quota -- we're not allocating
      any space, so we only need to reserve enough quota to handle the bmbt
      shape changes.
      
      Fixes: 3b0fe478 ("xfs: Don't use reserved blocks for data blocks with DAX")
      Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
      b8055ed6
    • Darrick J. Wong's avatar
      xfs: fix chown leaking delalloc quota blocks when fssetxattr fails · 1aecf373
      Darrick J. Wong authored
      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: default avatarDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
      1aecf373
  2. 01 Feb, 2021 2 commits
  3. 23 Jan, 2021 34 commits
  4. 18 Jan, 2021 1 commit
  5. 17 Jan, 2021 1 commit
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-2021-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux · e2da7836
      Linus Torvalds authored
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix 'CPU too large' error in Intel PT
      
       - Correct event attribute sizes in 'perf inject'
      
       - Sync build_bug.h and kvm.h kernel copies
      
       - Fix bpf.h header include directive in 5sec.c 'perf trace' bpf example
      
       - libbpf tests fixes
      
       - Fix shadow stat 'perf test' for non-bash shells
      
       - Take cgroups into account for shadow stats in 'perf stat'
      
      * tag 'perf-tools-fixes-2021-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf inject: Correct event attribute sizes
        perf intel-pt: Fix 'CPU too large' error
        perf stat: Take cgroups into account for shadow stats
        perf stat: Introduce struct runtime_stat_data
        libperf tests: Fail when failing to get a tracepoint id
        libperf tests: If a test fails return non-zero
        libperf tests: Avoid uninitialized variable warning
        perf test: Fix shadow stat test for non-bash shells
        tools headers: Syncronize linux/build_bug.h with the kernel sources
        tools headers UAPI: Sync kvm.h headers with the kernel sources
        perf bpf examples: Fix bpf.h header include directive in 5sec.c example
      e2da7836