1. 06 8月, 2022 1 次提交
  2. 25 7月, 2022 1 次提交
  3. 18 7月, 2022 2 次提交
  4. 22 5月, 2022 1 次提交
  5. 16 5月, 2022 1 次提交
  6. 21 4月, 2022 2 次提交
  7. 12 4月, 2022 1 次提交
  8. 02 2月, 2022 5 次提交
  9. 18 1月, 2022 1 次提交
    • D
      xfs: kill the XFS_IOC_{ALLOC,FREE}SP* ioctls · 4d1b97f9
      Darrick J. Wong 提交于
      According to the glibc compat header for Irix 4, these ioctls originated
      in April 1991 as a (somewhat clunky) way to preallocate space at the end
      of a file on an EFS filesystem.  XFS, which was released in Irix 5.3 in
      December 1993, picked up these ioctls to maintain compatibility and they
      were ported to Linux in the early 2000s.
      
      Recently it was pointed out to me they still lurk in the kernel, even
      though the Linux fallocate syscall supplanted the functionality a long
      time ago.  fstests doesn't seem to include any real functional or stress
      tests for these ioctls, which means that the code quality is ... very
      questionable.  Most notably, it was a stale disk block exposure vector
      for 21 years and nobody noticed or complained.  As mature programmers
      say, "If you're not testing it, it's broken."
      
      Given all that, let's withdraw these ioctls from the XFS userspace API.
      Normally we'd set a long deprecation process, but I estimate that there
      aren't any real users, so let's trigger a warning in dmesg and return
      -ENOTTY.
      
      See: CVE-2021-4155
      
      Augments: 983d8e60 ("xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate")
      Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
      Reviewed-by: NEric Sandeen <sandeen@redhat.com>
      Reviewed-by: NDave Chinner <dchinner@redhat.com>
      4d1b97f9
  10. 05 12月, 2021 1 次提交
  11. 24 10月, 2021 1 次提交
    • A
      iomap: Add done_before argument to iomap_dio_rw · 4fdccaa0
      Andreas Gruenbacher 提交于
      Add a done_before argument to iomap_dio_rw that indicates how much of
      the request has already been transferred.  When the request succeeds, we
      report that done_before additional bytes were tranferred.  This is
      useful for finishing a request asynchronously when part of the request
      has already been completed synchronously.
      
      We'll use that to allow iomap_dio_rw to be used with page faults
      disabled: when a page fault occurs while submitting a request, we
      synchronously complete the part of the request that has already been
      submitted.  The caller can then take care of the page fault and call
      iomap_dio_rw again for the rest of the request, passing in the number of
      bytes already tranferred.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
      4fdccaa0
  12. 18 10月, 2021 1 次提交
  13. 20 8月, 2021 3 次提交
  14. 13 7月, 2021 1 次提交
  15. 22 6月, 2021 2 次提交
  16. 09 6月, 2021 2 次提交
  17. 03 6月, 2021 1 次提交
    • D
      xfs: don't take a spinlock unconditionally in the DIO fastpath · 977ec4dd
      Dave Chinner 提交于
      Because this happens at high thread counts on high IOPS devices
      doing mixed read/write AIO-DIO to a single file at about a million
      iops:
      
         64.09%     0.21%  [kernel]            [k] io_submit_one
         - 63.87% io_submit_one
            - 44.33% aio_write
               - 42.70% xfs_file_write_iter
                  - 41.32% xfs_file_dio_write_aligned
                     - 25.51% xfs_file_write_checks
                        - 21.60% _raw_spin_lock
                           - 21.59% do_raw_spin_lock
                              - 19.70% __pv_queued_spin_lock_slowpath
      
      This also happens of the IO completion IO path:
      
         22.89%     0.69%  [kernel]            [k] xfs_dio_write_end_io
         - 22.49% xfs_dio_write_end_io
            - 21.79% _raw_spin_lock
               - 20.97% do_raw_spin_lock
                  - 20.10% __pv_queued_spin_lock_slowpath
      
      IOWs, fio is burning ~14 whole CPUs on this spin lock.
      
      So, do an unlocked check against inode size first, then if we are
      at/beyond EOF, take the spinlock and recheck. This makes the
      spinlock disappear from the overwrite fastpath.
      
      I'd like to report that fixing this makes things go faster. It
      doesn't - it just exposes the the XFS_ILOCK as the next severe
      contention point doing extent mapping lookups, and that now burns
      all the 14 CPUs this spinlock was burning.
      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>
      977ec4dd
  18. 27 5月, 2021 1 次提交
    • G
      xfs: Fix fall-through warnings for Clang · 53004ee7
      Gustavo A. R. Silva 提交于
      In preparation to enable -Wimplicit-fallthrough for Clang, fix
      the following warnings by replacing /* fall through */ comments,
      and its variants, with the new pseudo-keyword macro fallthrough:
      
      fs/xfs/libxfs/xfs_alloc.c:3167:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/libxfs/xfs_da_btree.c:286:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/libxfs/xfs_ag_resv.c:346:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/libxfs/xfs_ag_resv.c:388:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/xfs_bmap_util.c:246:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/xfs_export.c:88:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/xfs_export.c:96:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/xfs_file.c:867:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/xfs_ioctl.c:562:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/xfs_ioctl.c:1548:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/xfs_iomap.c:1040:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/xfs_inode.c:852:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/xfs_log.c:2627:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/xfs_trans_buf.c:298:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/scrub/bmap.c:275:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/scrub/btree.c:48:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/scrub/common.c:85:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/scrub/common.c:138:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/scrub/common.c:698:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/scrub/dabtree.c:51:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/scrub/repair.c:951:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      fs/xfs/scrub/agheader.c:89:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
      
      Notice that Clang doesn't recognize /* fall through */ comments as
      implicit fall-through markings, so in order to globally enable
      -Wimplicit-fallthrough for Clang, these comments need to be
      replaced with fallthrough; in the whole codebase.
      
      Link: https://github.com/KSPP/linux/issues/115Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
      53004ee7
  19. 08 4月, 2021 4 次提交
  20. 04 2月, 2021 4 次提交
  21. 02 2月, 2021 4 次提交