linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Shaohua Li <shli@kernel.org>, Jens Axboe <axboe@kernel.dk>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>, Ming Lei <tom.leiming@gmail.com>
Subject: linux-next: manual merge of the md tree with the block tree
Date: Mon, 10 Apr 2017 12:03:46 +1000	[thread overview]
Message-ID: <20170410120346.12076998@canb.auug.org.au> (raw)

Hi Shaohua,

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

  drivers/md/md.h

between commit:

  3deff1a70d59 ("md: support REQ_OP_WRITE_ZEROES")

from the block tree and commits:

  d8e29fbc3bed ("md: move two macros into md.h")
  513e2faa0138 ("md: prepare for managing resync I/O pages in clean way")

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/md.h
index 1e76d64ce180,0418b29945e7..000000000000
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
@@@ -710,10 -719,58 +719,65 @@@ static inline void mddev_check_writesam
  		mddev->queue->limits.max_write_same_sectors = 0;
  }
  
 +static inline void mddev_check_write_zeroes(struct mddev *mddev, struct bio *bio)
 +{
 +	if (bio_op(bio) == REQ_OP_WRITE_ZEROES &&
 +	    !bdev_get_queue(bio->bi_bdev)->limits.max_write_zeroes_sectors)
 +		mddev->queue->limits.max_write_zeroes_sectors = 0;
 +}
++
+ /* Maximum size of each resync request */
+ #define RESYNC_BLOCK_SIZE (64*1024)
+ #define RESYNC_PAGES ((RESYNC_BLOCK_SIZE + PAGE_SIZE-1) / PAGE_SIZE)
+ 
+ /* for managing resync I/O pages */
+ struct resync_pages {
+ 	unsigned	idx;	/* for get/put page from the pool */
+ 	void		*raid_bio;
+ 	struct page	*pages[RESYNC_PAGES];
+ };
+ 
+ static inline int resync_alloc_pages(struct resync_pages *rp,
+ 				     gfp_t gfp_flags)
+ {
+ 	int i;
+ 
+ 	for (i = 0; i < RESYNC_PAGES; i++) {
+ 		rp->pages[i] = alloc_page(gfp_flags);
+ 		if (!rp->pages[i])
+ 			goto out_free;
+ 	}
+ 
+ 	return 0;
+ 
+ out_free:
+ 	while (--i >= 0)
+ 		put_page(rp->pages[i]);
+ 	return -ENOMEM;
+ }
+ 
+ static inline void resync_free_pages(struct resync_pages *rp)
+ {
+ 	int i;
+ 
+ 	for (i = 0; i < RESYNC_PAGES; i++)
+ 		put_page(rp->pages[i]);
+ }
+ 
+ static inline void resync_get_all_pages(struct resync_pages *rp)
+ {
+ 	int i;
+ 
+ 	for (i = 0; i < RESYNC_PAGES; i++)
+ 		get_page(rp->pages[i]);
+ }
+ 
+ static inline struct page *resync_fetch_page(struct resync_pages *rp,
+ 					     unsigned idx)
+ {
+ 	if (WARN_ON_ONCE(idx >= RESYNC_PAGES))
+ 		return NULL;
+ 	return rp->pages[idx];
+ }
+ 
  #endif /* _MD_MD_H */

             reply	other threads:[~2017-04-10  2:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10  2:03 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-05-31  4:34 linux-next: manual merge of the md tree with the block tree Stephen Rothwell
2017-08-29  4:13 Stephen Rothwell
2017-06-13  4:33 Stephen Rothwell
2017-04-12  2:31 Stephen Rothwell
2017-04-10  2:08 Stephen Rothwell
2016-11-23  2:17 Stephen Rothwell
2016-11-22  4:50 Stephen Rothwell
2016-06-14  3:52 Stephen Rothwell
2016-06-14  3:52 Stephen Rothwell
2015-08-17  4:44 Stephen Rothwell
2015-08-17  4:44 Stephen Rothwell
2015-08-17  4:44 Stephen Rothwell
2014-01-15  4:07 Stephen Rothwell
2014-01-15  5:30 ` NeilBrown
2012-09-21  2:49 Stephen Rothwell
2011-10-07  3:06 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170410120346.12076998@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=shli@kernel.org \
    --cc=tom.leiming@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).