* linux-next: manual merge of the md tree
@ 2008-10-15 8:34 Stephen Rothwell
2008-10-15 10:52 ` Neil Brown
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2008-10-15 8:34 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-next, Denis ChengRq, Jens Axboe, Tejun Heo, Andre Noll
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))
^ permalink raw reply [flat|nested] 5+ messages in thread
* linux-next: manual merge of the md tree
@ 2008-10-15 8:41 Stephen Rothwell
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2008-10-15 8:41 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-next, Johannes Berg, Rusty Russell
Hi Neil,
Today's linux-next merge of the md tree got a conflict in drivers/md/md.c
between commit d8ade4ef35e2ae74b4d4b012eacd16ac1c34ad50 ("remove
CONFIG_KMOD from drivers") from the rr tree and commit
6caa3b0bbdb474647f6bdd8a958ffc46f78d8d58 ("md: Remove unnecessary
#includes, #defines, and function declarations") from the md tree.
Overlapping removals. I fixed it up (see below) and can carry the fix.
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/
diff --cc drivers/md/md.c
index 3323d76,8a34fc9..0000000
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@@ -41,17 -38,14 +38,15 @@@
#include <linux/sysctl.h>
#include <linux/buffer_head.h> /* for invalidate_bdev */
#include <linux/poll.h>
- #include <linux/mutex.h>
#include <linux/ctype.h>
- #include <linux/freezer.h>
- #include <linux/init.h>
- #include <linux/file.h>
+#include <linux/kmod.h>
-
- #include <asm/unaligned.h>
+ #include <linux/hdreg.h>
+ #include <linux/proc_fs.h>
+ #include <linux/random.h>
+ #include <linux/reboot.h>
+ #include <linux/file.h>
#define MAJOR_NR MD_MAJOR
- #define MD_DRIVER
/* 63 partitions with the alternate major number (mdp) */
#define MdpMinorShift 6
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: manual merge of the md tree
2008-10-15 8:34 linux-next: manual merge of the md tree Stephen Rothwell
@ 2008-10-15 10:52 ` Neil Brown
2008-10-16 6:07 ` Stephen Rothwell
0 siblings, 1 reply; 5+ messages in thread
From: Neil Brown @ 2008-10-15 10:52 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-next, Denis ChengRq, Jens Axboe, Tejun Heo, Andre Noll
On Wednesday October 15, sfr@canb•auug.org.au wrote:
> 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).
Thanks.
I pushed out a new for-next just a couple of hours before I got this
email which resolves that, so the conflict should disappear in your
next merge.
NeilBrown
> --
> 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))
> --
> To unsubscribe from this list: send the line "unsubscribe linux-next" in
> the body of a message to majordomo@vger•kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: manual merge of the md tree
2008-10-15 10:52 ` Neil Brown
@ 2008-10-16 6:07 ` Stephen Rothwell
2008-10-16 6:13 ` Stephen Rothwell
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2008-10-16 6:07 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-next, Denis ChengRq, Jens Axboe, Tejun Heo, Andre Noll
[-- Attachment #1: Type: text/plain, Size: 472 bytes --]
Hi Neil,
On Wed, 15 Oct 2008 21:52:38 +1100 Neil Brown <neilb@suse•de> wrote:
>
> I pushed out a new for-next just a couple of hours before I got this
> email which resolves that, so the conflict should disappear in your
> next merge.
Thanks for that. Unfortunately, neil.brown.name was unresolvable this
morning so it will have to wait for tomorrow.
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: manual merge of the md tree
2008-10-16 6:07 ` Stephen Rothwell
@ 2008-10-16 6:13 ` Stephen Rothwell
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2008-10-16 6:13 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-next, Denis ChengRq, Jens Axboe, Tejun Heo, Andre Noll
[-- Attachment #1: Type: text/plain, Size: 670 bytes --]
Hi Neil,
On Thu, 16 Oct 2008 17:07:57 +1100 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> On Wed, 15 Oct 2008 21:52:38 +1100 Neil Brown <neilb@suse•de> wrote:
> >
> > I pushed out a new for-next just a couple of hours before I got this
> > email which resolves that, so the conflict should disappear in your
> > next merge.
>
> Thanks for that. Unfortunately, neil.brown.name was unresolvable this
> morning so it will have to wait for tomorrow.
Actually I just managed to fetch it now, so it will make today's tree (if
I finish it :-().
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-16 6:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 8:34 linux-next: manual merge of the md tree Stephen Rothwell
2008-10-15 10:52 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox