1. Sep 16, 2019
  2. Sep 15, 2019
  3. Sep 14, 2019
    • Jens Axboe's avatar
      Merge branch 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.4/block · 99e5381d
      Jens Axboe authored
      Pull MD fixes from Song.
      
      * 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md:
        raid5: use bio_end_sector in r5_next_bio
        raid5: remove STRIPE_OPS_REQ_PENDING
        md: add feature flag MD_FEATURE_RAID0_LAYOUT
        md/raid0: avoid RAID0 data corruption due to layout confusion.
        raid5: don't set STRIPE_HANDLE to stripe which is in batch list
        raid5: don't increment read_errors on EILSEQ return
      99e5381d
    • Guoqing Jiang's avatar
      raid5: use bio_end_sector in r5_next_bio · 067df25c
      Guoqing Jiang authored
      
      
      Actually, we calculate bio's end sector here, so use the common
      way for the purpose.
      
      Signed-off-by: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      067df25c
    • Guoqing Jiang's avatar
      raid5: remove STRIPE_OPS_REQ_PENDING · feb9bf98
      Guoqing Jiang authored
      This stripe state is not used anymore after commit 51acbcec
      
      
      ("md: remove CONFIG_MULTICORE_RAID456"), so remove the obsoleted
      state.
      
      gjiang@nb01257:~/md$ grep STRIPE_OPS_REQ_PENDING drivers/md/ -r
      drivers/md/raid5.c:					  (1 << STRIPE_OPS_REQ_PENDING) |
      drivers/md/raid5.h:	STRIPE_OPS_REQ_PENDING,
      
      Signed-off-by: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      feb9bf98
    • NeilBrown's avatar
      md: add feature flag MD_FEATURE_RAID0_LAYOUT · 33f2c35a
      NeilBrown authored
      
      
      Due to a bug introduced in Linux 3.14 we cannot determine the
      correctly layout for a multi-zone RAID0 array - there are two
      possibilities.
      
      It is possible to tell the kernel which to chose using a module
      parameter, but this can be clumsy to use.  It would be best if
      the choice were recorded in the metadata.
      So add a feature flag for this purpose.
      If it is set, then the 'layout' field of the superblock is used
      to determine which layout to use.
      
      If this flag is not set, then mddev->layout gets set to -1,
      which causes the module parameter to be required.
      
      Acked-by: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      33f2c35a
    • NeilBrown's avatar
      md/raid0: avoid RAID0 data corruption due to layout confusion. · c84a1372
      NeilBrown authored
      If the drives in a RAID0 are not all the same size, the array is
      divided into zones.
      The first zone covers all drives, to the size of the smallest.
      The second zone covers all drives larger than the smallest, up to
      the size of the second smallest - etc.
      
      A change in Linux 3.14 unintentionally changed the layout for the
      second and subsequent zones.  All the correct data is still stored, but
      each chunk may be assigned to a different device than in pre-3.14 kernels.
      This can lead to data corruption.
      
      It is not possible to determine what layout to use - it depends which
      kernel the data was written by.
      So we add a module parameter to allow the old (0) or new (1) layout to be
      specified, and refused to assemble an affected array if that parameter is
      not set.
      
      Fixes: 20d0189b
      
       ("block: Introduce new bio_split()")
      cc: stable@vger.kernel.org (3.14+)
      Acked-by: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      c84a1372
    • Guoqing Jiang's avatar
      raid5: don't set STRIPE_HANDLE to stripe which is in batch list · 6ce220dd
      Guoqing Jiang authored
      If stripe in batch list is set with STRIPE_HANDLE flag, then the stripe
      could be set with STRIPE_ACTIVE by the handle_stripe function. And if
      error happens to the batch_head at the same time, break_stripe_batch_list
      is called, then below warning could happen (the same report in [1]), it
      means a member of batch list was set with STRIPE_ACTIVE.
      
      [7028915.431770] stripe state: 2001
      [7028915.431815] ------------[ cut here ]------------
      [7028915.431828] WARNING: CPU: 18 PID: 29089 at drivers/md/raid5.c:4614 break_stripe_batch_list+0x203/0x240 [raid456]
      [...]
      [7028915.431879] CPU: 18 PID: 29089 Comm: kworker/u82:5 Tainted: G           O    4.14.86-1-storage #4.14.86-1.2~deb9
      [7028915.431881] Hardware name: Supermicro SSG-2028R-ACR24L/X10DRH-iT, BIOS 3.1 06/18/2018
      [7028915.431888] Workqueue: raid5wq raid5_do_work [raid456]
      [7028915.431890] task: ffff9ab0ef36d7c0 task.stack: ffffb72926f84000
      [7028915.431896] RIP: 0010:break_stripe_batch_list+0x203/0x240 [raid456]
      [7028915.431898] RSP: 0018:ffffb72926f87ba8 EFLAGS: 00010286
      [7028915.431900] RAX: 0000000000000012 RBX: ffff9aaa84a98000 RCX: 0000000000000000
      [7028915.431901] RDX: 0000000000000000 RSI: ffff9ab2bfa15458 RDI: ffff9ab2bfa15458
      [7028915.431902] RBP: ffff9aaa8fb4e900 R08: 0000000000000001 R09: 0000000000002eb4
      [7028915.431903] R10: 00000000ffffffff R11: 0000000000000000 R12: ffff9ab1736f1b00
      [7028915.431904] R13: 0000000000000000 R14: ffff9aaa8fb4e900 R15: 0000000000000001
      [7028915.431906] FS:  0000000000000000(0000) GS:ffff9ab2bfa00000(0000) knlGS:0000000000000000
      [7028915.431907] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [7028915.431908] CR2: 00007ff953b9f5d8 CR3: 0000000bf4009002 CR4: 00000000003606e0
      [7028915.431909] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [7028915.431910] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [7028915.431910] Call Trace:
      [7028915.431923]  handle_stripe+0x8e7/0x2020 [raid456]
      [7028915.431930]  ? __wake_up_common_lock+0x89/0xc0
      [7028915.431935]  handle_active_stripes.isra.58+0x35f/0x560 [raid456]
      [7028915.431939]  raid5_do_work+0xc6/0x1f0 [raid456]
      
      Also commit 59fc630b ("RAID5: batch adjacent full stripe write")
      said "If a stripe is added to batch list, then only the first stripe
      of the list should be put to handle_list and run handle_stripe."
      
      So don't set STRIPE_HANDLE to stripe which is already in batch list,
      otherwise the stripe could be put to handle_list and run handle_stripe,
      then the above warning could be triggered.
      
      [1]. https://www.spinics.net/lists/raid/msg62552.html
      
      
      
      Signed-off-by: default avatarGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      6ce220dd
    • Nigel Croxon's avatar
      raid5: don't increment read_errors on EILSEQ return · b76b4715
      Nigel Croxon authored
      
      
      While MD continues to count read errors returned by the lower layer.
      If those errors are -EILSEQ, instead of -EIO, it should NOT increase
      the read_errors count.
      
      When RAID6 is set up on dm-integrity target that detects massive
      corruption, the leg will be ejected from the array.  Even if the
      issue is correctable with a sector re-write and the array has
      necessary redundancy to correct it.
      
      The leg is ejected because it runs up the rdev->read_errors beyond
      conf->max_nr_stripes.  The return status in dm-drypt when there is
      a data integrity error is -EILSEQ (BLK_STS_PROTECTION).
      
      Signed-off-by: default avatarNigel Croxon <ncroxon@redhat.com>
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      b76b4715
  4. Sep 13, 2019
    • Jens Axboe's avatar
      Merge branch 'nvme-5.4' of git://git.infradead.org/nvme into for-5.4/block · 21fa1004
      Jens Axboe authored
      Pull NVMe updates from Sagi:
      
      "Highlights includes:
       - controller reset and namespace scan races fixes
       - nvme discovery log change uevent support
       - naming improvements from Keith
       - multiple discovery controllers reject fix from James
       - some regular cleanups from various people"
      
      * 'nvme-5.4' of git://git.infradead.org/nvme:
        nvmet: fix a wrong error status returned in error log page
        nvme: send discovery log page change events to userspace
        nvme: add uevent variables for controller devices
        nvme: enable aen regardless of the presence of I/O queues
        nvme-fabrics: allow discovery subsystems accept a kato
        nvmet: Use PTR_ERR_OR_ZERO() in nvmet_init_discovery()
        nvme: Remove redundant assignment of cq vector
        nvme: Assign subsys instance from first ctrl
        nvme: tcp: remove redundant assignment to variable ret
        nvme: include admin_q sync with nvme_sync_queues
        nvme: Treat discovery subsystems as unique subsystems
        nvme: fix ns removal hang when failing to revalidate due to a transient error
        nvme: make nvme_report_ns_ids propagate error back
        nvme: make nvme_identify_ns propagate errors back
        nvme: pass status to nvme_error_status
        nvme-fc: Fail transport errors with NVME_SC_HOST_PATH
        nvme-tcp: fail command with NVME_SC_HOST_PATH_ERROR send failed
        nvme: fail cancelled commands with NVME_SC_HOST_PATH_ERROR
      21fa1004
  5. Sep 12, 2019
  6. Sep 11, 2019