From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Neil Brown <neilb@suse.de>
Cc: linux-next@vger.kernel.org, Denis ChengRq <crquan@gmail.com>,
Jens Axboe <jens.axboe@oracle.com>, Tejun Heo <tj@kernel.org>,
Andre Noll <maan@systemlinux.org>
Subject: linux-next: manual merge of the md tree
Date: Wed, 15 Oct 2008 19:34:13 +1100 [thread overview]
Message-ID: <20081015193413.90ec9792.sfr@canb.auug.org.au> (raw)
Hi Neil,
Today's linux-next merge of the md tree got a conflict in
drivers/md/linear.c between commits
c9959059161ddd7bf4670cf47367033d6b2f79c4 ("block: fix diskstats access")
and 6feef531f55cf4a20fd9eb39f5352e5745203603 ("block: mark bio_split_pool
static") from Linus' tree and commit
2bc5b53551d8246e18562fa8e0cf5fe64b5f8184 ("md: linear: Represent
dev_info->size and dev_info->offset in sectors") from the md tree.
Just overlapping changes. I fixed it up (see below).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff --cc drivers/md/linear.c
index b9cbee68,9b0c5b0..0000000
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@@ -317,33 -307,29 +307,33 @@@ static int linear_make_request (struct
const int rw = bio_data_dir(bio);
mddev_t *mddev = q->queuedata;
dev_info_t *tmp_dev;
- sector_t block;
+ int cpu;
if (unlikely(bio_barrier(bio))) {
bio_endio(bio, -EOPNOTSUPP);
return 0;
}
- disk_stat_inc(mddev->gendisk, ios[rw]);
- disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio));
+ cpu = part_stat_lock();
+ part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]);
+ part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw],
+ bio_sectors(bio));
+ part_stat_unlock();
tmp_dev = which_dev(mddev, bio->bi_sector);
- block = bio->bi_sector >> 1;
- if (unlikely(block >= (tmp_dev->size + tmp_dev->offset)
- || block < tmp_dev->offset)) {
+ if (unlikely(bio->bi_sector >= (tmp_dev->num_sectors +
+ tmp_dev->start_sector)
+ || (bio->bi_sector <
+ tmp_dev->start_sector))) {
char b[BDEVNAME_SIZE];
- printk("linear_make_request: Block %llu out of bounds on "
- "dev %s size %llu offset %llu\n",
- (unsigned long long)block,
+ printk("linear_make_request: Sector %llu out of bounds on "
+ "dev %s: %llu sectors, offset %llu\n",
+ (unsigned long long)bio->bi_sector,
bdevname(tmp_dev->rdev->bdev, b),
- (unsigned long long)tmp_dev->size,
- (unsigned long long)tmp_dev->offset);
+ (unsigned long long)tmp_dev->num_sectors,
+ (unsigned long long)tmp_dev->start_sector);
bio_io_error(bio);
return 0;
}
@@@ -353,8 -339,9 +343,9 @@@
* split it.
*/
struct bio_pair *bp;
- bp = bio_split(bio, bio_split_pool,
+ bp = bio_split(bio,
- ((tmp_dev->offset + tmp_dev->size)<<1) - bio->bi_sector);
+ tmp_dev->start_sector + tmp_dev->num_sectors
+ - bio->bi_sector);
if (linear_make_request(q, &bp->bio1))
generic_make_request(&bp->bio1);
if (linear_make_request(q, &bp->bio2))
next reply other threads:[~2008-10-15 9:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 8:34 Stephen Rothwell [this message]
2008-10-15 10:52 ` linux-next: manual merge of the md tree Neil Brown
2008-10-16 6:07 ` Stephen Rothwell
2008-10-16 6:13 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2008-10-15 8:41 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=20081015193413.90ec9792.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=crquan@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=linux-next@vger.kernel.org \
--cc=maan@systemlinux.org \
--cc=neilb@suse.de \
--cc=tj@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