Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'md/4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md

Pull MD fixes from Shaohua Li:
"Three small fixes for MD:

- md-cluster fix for faulty device from Guoqing

- writehint fix for writebehind IO for raid1 from Mariusz

- a live lock fix for interrupted recovery from Yufen"

* tag 'md/4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
raid1: copy write hint from master bio to behind bio
md/raid1: exit sync request if MD_RECOVERY_INTR is set
md-cluster: don't update recovery_offset for faulty device

+24 -7
+4 -2
drivers/md/md.c
··· 9256 9256 check_sb_changes(mddev, rdev); 9257 9257 9258 9258 /* Read all rdev's to update recovery_offset */ 9259 - rdev_for_each_rcu(rdev, mddev) 9260 - read_rdev(mddev, rdev); 9259 + rdev_for_each_rcu(rdev, mddev) { 9260 + if (!test_bit(Faulty, &rdev->flags)) 9261 + read_rdev(mddev, rdev); 9262 + } 9261 9263 } 9262 9264 EXPORT_SYMBOL(md_reload_sb); 9263 9265
+20 -5
drivers/md/raid1.c
··· 854 854 * there is no normal IO happeing. It must arrange to call 855 855 * lower_barrier when the particular background IO completes. 856 856 */ 857 - static void raise_barrier(struct r1conf *conf, sector_t sector_nr) 857 + static sector_t raise_barrier(struct r1conf *conf, sector_t sector_nr) 858 858 { 859 859 int idx = sector_to_idx(sector_nr); 860 860 ··· 885 885 * max resync count which allowed on current I/O barrier bucket. 886 886 */ 887 887 wait_event_lock_irq(conf->wait_barrier, 888 - !conf->array_frozen && 888 + (!conf->array_frozen && 889 889 !atomic_read(&conf->nr_pending[idx]) && 890 - atomic_read(&conf->barrier[idx]) < RESYNC_DEPTH, 890 + atomic_read(&conf->barrier[idx]) < RESYNC_DEPTH) || 891 + test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery), 891 892 conf->resync_lock); 893 + 894 + if (test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { 895 + atomic_dec(&conf->barrier[idx]); 896 + spin_unlock_irq(&conf->resync_lock); 897 + wake_up(&conf->wait_barrier); 898 + return -EINTR; 899 + } 892 900 893 901 atomic_inc(&conf->nr_sync_pending); 894 902 spin_unlock_irq(&conf->resync_lock); 903 + 904 + return 0; 895 905 } 896 906 897 907 static void lower_barrier(struct r1conf *conf, sector_t sector_nr) ··· 1101 1091 behind_bio->bi_iter.bi_size = size; 1102 1092 goto skip_copy; 1103 1093 } 1094 + 1095 + behind_bio->bi_write_hint = bio->bi_write_hint; 1104 1096 1105 1097 while (i < vcnt && size) { 1106 1098 struct page *page; ··· 2674 2662 2675 2663 bitmap_cond_end_sync(mddev->bitmap, sector_nr, 2676 2664 mddev_is_clustered(mddev) && (sector_nr + 2 * RESYNC_SECTORS > conf->cluster_sync_high)); 2677 - r1_bio = raid1_alloc_init_r1buf(conf); 2678 2665 2679 - raise_barrier(conf, sector_nr); 2666 + 2667 + if (raise_barrier(conf, sector_nr)) 2668 + return 0; 2669 + 2670 + r1_bio = raid1_alloc_init_r1buf(conf); 2680 2671 2681 2672 rcu_read_lock(); 2682 2673 /*