linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kent Overstreet <koverstreet@google.com>,
	Jens Axboe <axboe@kernel.dk>
Subject: linux-next: manual merge of the akpm tree with the block tree
Date: Tue, 26 Mar 2013 16:33:49 +1100	[thread overview]
Message-ID: <20130326163349.14db6908651d400d92f91b2f@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2693 bytes --]

Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
block/blk-core.c between commit f79ea4161434 ("block: Refactor
blk_update_request()") from the block tree and commit "block, aio: batch
completion for bios/kiocbs" from the akpm tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc block/blk-core.c
index f224d17,186603b..0000000
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@@ -2280,9 -2251,11 +2281,10 @@@ EXPORT_SYMBOL(blk_fetch_request)
   *     %false - this request doesn't have any more data
   *     %true  - this request has more data
   **/
- bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
+ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes,
+ 			struct batch_complete *batch)
  {
 -	int total_bytes, bio_nbytes, next_idx = 0;
 -	struct bio *bio;
 +	int total_bytes;
  
  	if (!req->bio)
  		return false;
@@@ -2328,21 -2301,56 +2330,21 @@@
  
  	blk_account_io_completion(req, nr_bytes);
  
 -	total_bytes = bio_nbytes = 0;
 -	while ((bio = req->bio) != NULL) {
 -		int nbytes;
 +	total_bytes = 0;
 +	while (req->bio) {
 +		struct bio *bio = req->bio;
 +		unsigned bio_bytes = min(bio->bi_size, nr_bytes);
  
 -		if (nr_bytes >= bio->bi_size) {
 +		if (bio_bytes == bio->bi_size)
  			req->bio = bio->bi_next;
 -			nbytes = bio->bi_size;
 -			req_bio_endio(req, bio, nbytes, error, batch);
 -			next_idx = 0;
 -			bio_nbytes = 0;
 -		} else {
 -			int idx = bio->bi_idx + next_idx;
  
- 		req_bio_endio(req, bio, bio_bytes, error);
 -			if (unlikely(idx >= bio->bi_vcnt)) {
 -				blk_dump_rq_flags(req, "__end_that");
 -				printk(KERN_ERR "%s: bio idx %d >= vcnt %d\n",
 -				       __func__, idx, bio->bi_vcnt);
 -				break;
 -			}
++		req_bio_endio(req, bio, bio_bytes, error, batch);
  
 -			nbytes = bio_iovec_idx(bio, idx)->bv_len;
 -			BIO_BUG_ON(nbytes > bio->bi_size);
 +		total_bytes += bio_bytes;
 +		nr_bytes -= bio_bytes;
  
 -			/*
 -			 * not a complete bvec done
 -			 */
 -			if (unlikely(nbytes > nr_bytes)) {
 -				bio_nbytes += nr_bytes;
 -				total_bytes += nr_bytes;
 -				break;
 -			}
 -
 -			/*
 -			 * advance to the next vector
 -			 */
 -			next_idx++;
 -			bio_nbytes += nbytes;
 -		}
 -
 -		total_bytes += nbytes;
 -		nr_bytes -= nbytes;
 -
 -		bio = req->bio;
 -		if (bio) {
 -			/*
 -			 * end more in this run, or just return 'not-done'
 -			 */
 -			if (unlikely(nr_bytes <= 0))
 -				break;
 -		}
 +		if (!nr_bytes)
 +			break;
  	}
  
  	/*

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2013-03-26  5:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26  5:33 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-02-03  4:53 linux-next: manual merge of the akpm tree with the block tree Stephen Rothwell
2015-01-21  7:46 Stephen Rothwell
2013-04-30  6:02 Stephen Rothwell
2013-03-26  5:25 Stephen Rothwell
2013-03-26  5:11 Stephen Rothwell
2013-01-15  3:10 Stephen Rothwell
2013-01-14  3:58 Stephen Rothwell
2013-01-15 14:33 ` Asai Thambi S P
2012-11-12  4:15 Stephen Rothwell
2012-11-12 21:07 ` Andrew Morton
2012-11-12 21:20   ` Jens Axboe
2012-11-12 21:29     ` Andrew Morton
2012-11-12 21:30       ` Jens Axboe
2011-10-25  9:07 Stephen Rothwell
2011-10-25 18:20 ` Mike Miller

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=20130326163349.14db6908651d400d92f91b2f@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=koverstreet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    /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).