Merge tag 'md/4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Sep 2017 19:41:48 +0000 (12:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Sep 2017 19:41:48 +0000 (12:41 -0700)
Pull MD updates from Shaohua Li:
 "This update mainly fixes bugs:

   - Make raid5 ppl support several ppl from Pawel

   - Several raid5-cache bug fixes from Song

   - Bitmap fixes from Neil and Me

   - One raid1/10 regression fix since 4.12 from Me

   - Other small fixes and cleanup"

* tag 'md/4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
  md/bitmap: disable bitmap_resize for file-backed bitmaps.
  raid5-ppl: Recovery support for multiple partial parity logs
  md: Runtime support for multiple ppls
  md/raid0: attach correct cgroup info in bio
  lib/raid6: align AVX512 constants to 512 bits, not bytes
  raid5: remove raid5_build_block
  md/r5cache: call mddev_lock/unlock() in r5c_journal_mode_show
  md: replace seq_release_private with seq_release
  md: notify about new spare disk in the container
  md/raid1/10: reset bio allocated from mempool
  md/raid5: release/flush io in raid5_do_work()
  md/bitmap: copy correct data for bitmap super

1  2 
block/bio.c
drivers/md/md.c
drivers/md/md.h
drivers/md/raid0.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5-cache.c
drivers/md/raid5-ppl.c
drivers/md/raid5.c

diff --cc block/bio.c
Simple merge
diff --cc drivers/md/md.c
Simple merge
diff --cc drivers/md/md.h
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 1e237c40d6fa26c816825b6f99631ce76bd0e8db,a98ef172f8e8b58cc23db42059d82ba1f995f959..cd026c88f7efa7e1bf2367a4a6f41ab5336b451e
@@@ -451,12 -456,25 +456,25 @@@ static void ppl_submit_iounit(struct pp
        pplhdr->entries_count = cpu_to_le32(io->entries_count);
        pplhdr->checksum = cpu_to_le32(~crc32c_le(~0, pplhdr, PPL_HEADER_SIZE));
  
+       /* Rewind the buffer if current PPL is larger then remaining space */
+       if (log->use_multippl &&
+           log->rdev->ppl.sector + log->rdev->ppl.size - log->next_io_sector <
+           (PPL_HEADER_SIZE + io->pp_size) >> 9)
+               log->next_io_sector = log->rdev->ppl.sector;
        bio->bi_end_io = ppl_log_endio;
        bio->bi_opf = REQ_OP_WRITE | REQ_FUA;
 -      bio->bi_bdev = log->rdev->bdev;
 +      bio_set_dev(bio, log->rdev->bdev);
-       bio->bi_iter.bi_sector = log->rdev->ppl.sector;
+       bio->bi_iter.bi_sector = log->next_io_sector;
        bio_add_page(bio, io->header_page, PAGE_SIZE, 0);
  
+       pr_debug("%s: log->current_io_sector: %llu\n", __func__,
+           (unsigned long long)log->next_io_sector);
+       if (log->use_multippl)
+               log->next_io_sector += (PPL_HEADER_SIZE + io->pp_size) >> 9;
        list_for_each_entry(sh, &io->stripe_list, log_list) {
                /* entries for full stripe writes have no partial parity */
                if (test_bit(STRIPE_FULL_WRITE, &sh->state))
Simple merge