1. 27 Aug, 2021 1 commit
    • Guoqing Jiang's avatar
      raid1: ensure write behind bio has less than BIO_MAX_VECS sectors · 6607cd31
      Guoqing Jiang authored
      We can't split write behind bio with more than BIO_MAX_VECS sectors,
      otherwise the below call trace was triggered because we could allocate
      oversized write behind bio later.
      
      [ 8.097936] bvec_alloc+0x90/0xc0
      [ 8.098934] bio_alloc_bioset+0x1b3/0x260
      [ 8.099959] raid1_make_request+0x9ce/0xc50 [raid1]
      [ 8.100988] ? __bio_clone_fast+0xa8/0xe0
      [ 8.102008] md_handle_request+0x158/0x1d0 [md_mod]
      [ 8.103050] md_submit_bio+0xcd/0x110 [md_mod]
      [ 8.104084] submit_bio_noacct+0x139/0x530
      [ 8.105127] submit_bio+0x78/0x1d0
      [ 8.106163] ext4_io_submit+0x48/0x60 [ext4]
      [ 8.107242] ext4_writepages+0x652/0x1170 [ext4]
      [ 8.108300] ? do_writepages+0x41/0x100
      [ 8.109338] ? __ext4_mark_inode_dirty+0x240/0x240 [ext4]
      [ 8.110406] do_writepages+0x41/0x100
      [ 8.111450] __filemap_fdatawrite_range+0xc5/0x100
      [ 8.112513] file_write_and_wait_range+0x61/0xb0
      [ 8.113564] ext4_sync_file+0x73/0x370 [ext4]
      [ 8.114607] __x64_sys_fsync+0x33/0x60
      [ 8.115635] do_syscall_64+0x33/0x40
      [ 8.116670] entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      Thanks for the comment from Christoph.
      
      [1]. https://bugs.archlinux.org/task/70992
      
      Cc: stable@vger.kernel.org # v5.12+
      Reported-by: default avatarJens Stutte <jens@chianterastutte.eu>
      Tested-by: default avatarJens Stutte <jens@chianterastutte.eu>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarGuoqing Jiang <jiangguoqing@kylinos.cn>
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      6607cd31
  2. 26 Aug, 2021 1 commit
    • Xiao Ni's avatar
      md/raid10: Remove unnecessary rcu_dereference in raid10_handle_discard · 46d4703b
      Xiao Ni authored
      We are seeing the following warning in raid10_handle_discard.
      [  695.110751] =============================
      [  695.131439] WARNING: suspicious RCU usage
      [  695.151389] 4.18.0-319.el8.x86_64+debug #1 Not tainted
      [  695.174413] -----------------------------
      [  695.192603] drivers/md/raid10.c:1776 suspicious
      rcu_dereference_check() usage!
      [  695.225107] other info that might help us debug this:
      [  695.260940] rcu_scheduler_active = 2, debug_locks = 1
      [  695.290157] no locks held by mkfs.xfs/10186.
      
      In the first loop of function raid10_handle_discard. It already
      determines which disk need to handle discard request and add the
      rdev reference count rdev->nr_pending. So the conf->mirrors will
      not change until all bios come back from underlayer disks. It
      doesn't need to use rcu_dereference to get rdev.
      
      Cc: stable@vger.kernel.org
      Fixes: d30588b2 ('md/raid10: improve raid10 discard request')
      Signed-off-by: default avatarXiao Ni <xni@redhat.com>
      Acked-by: default avatarGuoqing Jiang <guoqing.jiang@linux.dev>
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      46d4703b
  3. 25 Aug, 2021 6 commits
  4. 18 Aug, 2021 1 commit
    • Jens Axboe's avatar
      Merge tag 'nvme-5.15-2021-08-18' of git://git.infradead.org/nvme into for-5.15/drivers · ca27f5b5
      Jens Axboe authored
      Pull NVMe updates from Christoph:
      
      "nvme updates for Linux 5.15.
      
       - suspend improvements for devices with an HMB (Keith Busch)
       - handle double completions more gacefull (Sagi Grimberg)
       - cleanup the selects for the nvme core code a bit (Sagi Grimberg)
       - don't update queue count when failing to set io queues (Ruozhu Li)
       - various nvmet connect fixes (Amit Engel)
       - cleanup lightnvm leftovers (Keith Busch, me)
       - small cleanups (Colin Ian King, Hou Pu)
       - add tracing for the Set Features command (Hou Pu)
       - CMB sysfs cleanups (Keith Busch)
       - add a mutex_destroy call (Keith Busch)"
      
      * tag 'nvme-5.15-2021-08-18' of git://git.infradead.org/nvme: (21 commits)
        nvme: remove the unused NVME_NS_* enum
        nvme: remove nvm_ndev from ns
        nvme: Have NVME_FABRICS select NVME_CORE instead of transport drivers
        nvmet: check that host sqsize does not exceed ctrl MQES
        nvmet: avoid duplicate qid in connect cmd
        nvmet: pass back cntlid on successful completion
        nvme-rdma: don't update queue count when failing to set io queues
        nvme-tcp: don't update queue count when failing to set io queues
        nvme-tcp: pair send_mutex init with destroy
        nvme: allow user toggling hmb usage
        nvme-pci: disable hmb on idle suspend
        nvmet: remove redundant assignments of variable status
        nvmet: add set feature tracing support
        nvme: add set feature tracing support
        nvme-fabrics: remove superfluous nvmf_host_put in nvmf_parse_options
        nvme-pci: cmb sysfs: one file, one value
        nvme-pci: use attribute group for cmb sysfs
        nvme: code command_id with a genctr for use-after-free validation
        nvme-tcp: don't check blk_mq_tag_to_rq when receiving pdu data
        nvme-pci: limit maximum queue depth to 4095
        ...
      ca27f5b5
  5. 17 Aug, 2021 1 commit
  6. 16 Aug, 2021 21 commits
  7. 14 Aug, 2021 1 commit
  8. 13 Aug, 2021 7 commits
  9. 10 Aug, 2021 1 commit