From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751280AbdH2ENk (ORCPT ); Tue, 29 Aug 2017 00:13:40 -0400 Received: from ozlabs.org ([103.22.144.67]:46857 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbdH2ENj (ORCPT ); Tue, 29 Aug 2017 00:13:39 -0400 Date: Tue, 29 Aug 2017 14:13:36 +1000 From: Stephen Rothwell To: Shaohua Li , Jens Axboe Cc: Linux-Next Mailing List , Linux Kernel Mailing List , Christoph Hellwig , Pawel Baldysiak , Artur Paszkiewicz Subject: linux-next: manual merge of the md tree with the block tree Message-ID: <20170829141336.136e7d3e@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shaohua, Today's linux-next merge of the md tree got a conflict in: drivers/md/raid5-ppl.c between commit: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") from the block tree and commit: ddc088238cd6 ("md: Runtime support for multiple ppls") from the md tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. -- Cheers, Stephen Rothwell diff --cc drivers/md/raid5-ppl.c index 1e237c40d6fa,a98ef172f8e8..000000000000 --- a/drivers/md/raid5-ppl.c +++ b/drivers/md/raid5-ppl.c @@@ -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))