1. 14 Jun, 2023 2 commits
    • Jens Axboe's avatar
      Merge tag 'md-next-20230613' of... · 60701311
      Jens Axboe authored
      Merge tag 'md-next-20230613' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.5/block
      
      Pull MD updates from Song:
      
      "The major changes are:
      
       1. Protect md_thread with rcu, by Yu Kuai;
       2. Various non-urgent raid5 and raid1/10 fixes, by Yu Kuai;
       3. Non-urgent raid10 fixes, by Li Nan."
      
      * tag 'md-next-20230613' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: (29 commits)
        md/raid1-10: limit the number of plugged bio
        md/raid1-10: don't handle pluged bio by daemon thread
        md/md-bitmap: add a new helper to unplug bitmap asynchrously
        md/raid1-10: submit write io directly if bitmap is not enabled
        md/raid1-10: factor out a helper to submit normal write
        md/raid1-10: factor out a helper to add bio to plug
        md/raid10: prevent soft lockup while flush writes
        md/raid10: fix io loss while replacement replace rdev
        md/raid10: Do not add spare disk when recovery fails
        md/raid10: clean up md_add_new_disk()
        md/raid10: prioritize adding disk to 'removed' mirror
        md/raid10: improve code of mrdev in raid10_sync_request
        md/raid10: fix null-ptr-deref of mreplace in raid10_sync_request
        md/raid5: don't start reshape when recovery or replace is in progress
        md: protect md_thread with rcu
        md/bitmap: factor out a helper to set timeout
        md/bitmap: always wake up md_thread in timeout_store
        dm-raid: remove useless checking in raid_message()
        md: factor out a helper to wake up md_thread directly
        md: fix duplicate filename for rdev
        ...
      60701311
    • David Howells's avatar
      block: Fix dio_cleanup() to advance the head index · d44c4042
      David Howells authored
      Fix dio_bio_cleanup() to advance the head index into the list of pages past
      the pages it has released, as __blockdev_direct_IO() will call it twice if
      do_direct_IO() fails.
      
      The issue was causing:
      
              WARNING: CPU: 6 PID: 2220 at mm/gup.c:76 try_get_folio
      
      This can be triggered by setting up a clean pair of UDF filesystems on
      loopback devices and running the generic/451 xfstest with them as the
      scratch and test partitions.  Something like the following:
      
          fallocate /mnt2/udf_scratch -l 1G
          fallocate /mnt2/udf_test -l 1G
          mknod /dev/lo0 b 7 0
          mknod /dev/lo1 b 7 1
          losetup lo0 /mnt2/udf_scratch
          losetup lo1 /mnt2/udf_test
          mkfs -t udf /dev/lo0
          mkfs -t udf /dev/lo1
          cd xfstests
          ./check generic/451
      
      with xfstests configured by putting the following into local.config:
      
          export FSTYP=udf
          export DISABLE_UDF_TEST=1
          export TEST_DEV=/dev/lo1
          export TEST_DIR=/xfstest.test
          export SCRATCH_DEV=/dev/lo0
          export SCRATCH_MNT=/xfstest.scratch
      
      Fixes: 1ccf164e ("block: Use iov_iter_extract_pages() and page pinning in direct-io.c")
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Closes: https://lore.kernel.org/oe-lkp/202306120931.a9606b88-oliver.sang@intel.comSigned-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Christoph Hellwig <hch@infradead.org>
      cc: David Hildenbrand <david@redhat.com>
      cc: Andrew Morton <akpm@linux-foundation.org>
      cc: Jens Axboe <axboe@kernel.dk>
      cc: Al Viro <viro@zeniv.linux.org.uk>
      cc: Matthew Wilcox <willy@infradead.org>
      cc: Jan Kara <jack@suse.cz>
      cc: Jeff Layton <jlayton@kernel.org>
      cc: Jason Gunthorpe <jgg@nvidia.com>
      cc: Logan Gunthorpe <logang@deltatee.com>
      cc: Hillf Danton <hdanton@sina.com>
      cc: Christian Brauner <brauner@kernel.org>
      cc: Linus Torvalds <torvalds@linux-foundation.org>
      cc: linux-fsdevel@vger.kernel.org
      cc: linux-block@vger.kernel.org
      cc: linux-kernel@vger.kernel.org
      cc: linux-mm@kvack.org
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Link: https://lore.kernel.org/r/1193485.1686693279@warthog.procyon.org.ukSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      d44c4042
  2. 13 Jun, 2023 30 commits
  3. 12 Jun, 2023 8 commits