linux-next: manual merge of the block tree with the btrfs-kdave tree

From: Stephen Rothwell
Date: Sun Feb 17 2019 - 20:08:36 EST


Hi Jens,

Today's linux-next merge of the block tree got a conflict in:

fs/btrfs/extent_io.c

between commit:

2ce8afc500de ("btrfs: extent_io: Kill the forward declaration of flush_write_bio")

from the btrfs-kdave tree and commit:

c3a7ce738009 ("btrfs: use mp_bvec_last_segment to get bio's last page")

from the block tree.

I fixed it up (the former moved the function updated by the latter - 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 fs/btrfs/extent_io.c
index ca259c75bbcd,4ed58c9a94a9..000000000000
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@@ -147,38 -147,7 +147,39 @@@ static int add_extent_changeset(struct
return ret;
}

-static void flush_write_bio(struct extent_page_data *epd);
+static int __must_check submit_one_bio(struct bio *bio, int mirror_num,
+ unsigned long bio_flags)
+{
+ blk_status_t ret = 0;
+ struct bio_vec *bvec = bio_last_bvec_all(bio);
- struct page *page = bvec->bv_page;
++ struct bio_vec bv;
+ struct extent_io_tree *tree = bio->bi_private;
+ u64 start;
+
- start = page_offset(page) + bvec->bv_offset;
++ mp_bvec_last_segment(bvec, &bv);
++ start = page_offset(bv.bv_page) + bv.bv_offset;
+
+ bio->bi_private = NULL;
+
+ if (tree->ops)
+ ret = tree->ops->submit_bio_hook(tree->private_data, bio,
+ mirror_num, bio_flags, start);
+ else
+ btrfsic_submit_bio(bio);
+
+ return blk_status_to_errno(ret);
+}
+
+static void flush_write_bio(struct extent_page_data *epd)
+{
+ if (epd->bio) {
+ int ret;
+
+ ret = submit_one_bio(epd->bio, 0, 0);
+ BUG_ON(ret < 0); /* -ENOMEM */
+ epd->bio = NULL;
+ }
+}

int __init extent_io_init(void)
{

Attachment: pgpcTRQzUnMKp.pgp
Description: OpenPGP digital signature