public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Jens Axboe <jens.axboe@oracle•com>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle•com>,
	Mikulas Patocka <mpatocka@redhat•com>,
	Mike Snitzer <snitzer@redhat•com>,
	Alasdair G Kergon <agk@redhat•com>
Subject: linux-next: block tree build failure
Date: Mon, 25 May 2009 14:35:11 +1000	[thread overview]
Message-ID: <20090525143511.f9e76bdc.sfr@canb.auug.org.au> (raw)

Hi Jens,

Today's linux-next build (powerpc ppc64_defconfig) failed like this:

drivers/md/dm.c: In function 'dm_merge_bvec':
drivers/md/dm.c:976: error: 'struct request_queue' has no member named 'max_hw_sectors'

Caused by commit 025146e13b63483add912706c101fb0fb6f015cc ("block: Move
queue limits to an embedded struct") from the block tree interacting with
commit c8f4b88baca86491a6125cf9373a75e04b22ff8b
("dm-avoid-unsupported-spanning-of-md-stripe-boundaries") from the
device-mapper tree.

Another sudden API change ...

The correct way:
	add new accessor implemented in terms of old API that is a noop
	push that to Linus
	fixup all the references to the old API (telling the users)
	wait for other users (if any) to use new accessor
	remove old API

We have done this several times ...  Linus is will to take the "add new
accessor" patches basically any time.

So I added this patch:

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 7b939fa..ea9a9e6 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -973,7 +973,7 @@ static int dm_merge_bvec(struct request_queue *q,
 	 * entries.  So always set max_size to 0, and the code below allows
 	 * just one page.
 	 */
-	else if (q->max_hw_sectors <= PAGE_SIZE >> 9)
+	else if (queue_max_hw_sectors(q) <= PAGE_SIZE >> 9)
 		max_size = 0;
 
 out_table:

But now I get:

drivers/md/dm-table.c: In function 'device_area_is_valid':
drivers/md/dm-table.c:390: error: 'struct io_restrictions' has no member named 'hardsect_size'
drivers/md/dm-table.c:414: error: 'struct io_restrictions' has no member named 'hardsect_size'
drivers/md/dm-table.c: In function 'validate_hardsect_alignment':
drivers/md/dm-table.c:738: error: 'struct io_restrictions' has no member named 'hardsect_size'
drivers/md/dm-table.c:765: error: 'struct io_restrictions' has no member named 'hardsect_size'
drivers/md/dm-table.c:777: error: 'struct io_restrictions' has no member named 'hardsect_size'

This is caused by commit e1defc4ff0cf57aca6c5e3ff99fa503f5943c1f1
("block: Do away with the notion of hardsect_size") from the block tree
interacting with commits cc1018ae8a413b595a1f0f822928dd9e81a75e59
("dm-table-ensure-targets-are-aligned-to-hardsect_size") and
64b184139ca6cd3d53dc45d7782c8be50b3e0331
("dm-table-validate-device-hardsect_size") from the device-mapper tree.

So I added the following patch as well.

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index d38b911..8f734ad 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -387,7 +387,7 @@ static int device_area_is_valid(struct dm_target *ti, struct block_device *bdev,
 			     sector_t start, sector_t len)
 {
 	sector_t dev_size = bdev->bd_inode->i_size >> SECTOR_SHIFT;
-	unsigned short hardsect_size_sectors = ti->limits.hardsect_size >>
+	unsigned short hardsect_size_sectors = ti->limits.logical_block_size >>
 					       SECTOR_SHIFT;
 	char b[BDEVNAME_SIZE];
 
@@ -414,7 +414,7 @@ static int device_area_is_valid(struct dm_target *ti, struct block_device *bdev,
 		DMWARN("%s: len=%llu not aligned to h/w sector size %hu of %s",
 		       dm_device_name(ti->table->md),
 		       (unsigned long long)len,
-		       ti->limits.hardsect_size, bdevname(bdev, b));
+		       ti->limits.logical_block_size, bdevname(bdev, b));
 		return 0;
 	}
 
@@ -735,7 +735,7 @@ static int validate_hardsect_alignment(struct dm_table *table)
 	 * (in units of 512-byte sectors).
 	 */
 	unsigned short device_hardsect_size_sects =
-			    table->limits.hardsect_size >> SECTOR_SHIFT;
+			    table->limits.logical_block_size >> SECTOR_SHIFT;
 
 	/*
 	 * Offset of the start of the next table entry, mod hardsect_size.
@@ -762,7 +762,7 @@ static int validate_hardsect_alignment(struct dm_table *table)
 		 * table entry are they compatible with its hardsect_size?
 		 */
 		if (remaining < ti->len &&
-		    remaining & ((ti->limits.hardsect_size >>
+		    remaining & ((ti->limits.logical_block_size >>
 				  SECTOR_SHIFT) - 1))
 			break;	/* Error */
 
@@ -779,7 +779,7 @@ static int validate_hardsect_alignment(struct dm_table *table)
 		       dm_device_name(table->md), i,
 		       (unsigned long long) ti->begin,
 		       (unsigned long long) ti->len,
-		       table->limits.hardsect_size);
+		       table->limits.logical_block_size);
 		return -EINVAL;
 	}
 

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

             reply	other threads:[~2009-05-25  4:35 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25  4:35 Stephen Rothwell [this message]
2009-05-25  5:38 ` linux-next: block tree build failure Martin K. Petersen
2009-05-25  5:54   ` Stephen Rothwell
2009-05-26 13:54     ` [RFC] updated DM table alignment validation patches [Was: Re: linux-next: block tree build failure] Mike Snitzer
  -- strict thread matches above, loose matches on Subject: below --
2009-12-07  8:44 linux-next: block tree build failure Stephen Rothwell
2009-12-07  8:49 ` Jens Axboe
2009-12-07  9:23   ` Stephen Rothwell
2009-12-07  9:28     ` Jens Axboe
2009-12-04  3:36 Stephen Rothwell
2009-12-04  7:43 ` Jens Axboe
2009-12-04 13:54   ` Jens Axboe
2009-12-04 22:49     ` Stephen Rothwell
2009-12-05  9:20       ` Jens Axboe
2009-10-27  3:34 Stephen Rothwell
2009-10-27  5:31 ` Jens Axboe
2009-10-27  5:50   ` Stephen Rothwell
2009-10-07  2:55 Stephen Rothwell
     [not found] ` <20091007135505.df1f058c.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2009-10-07  6:33   ` Jens Axboe
2009-09-23  4:51 Stephen Rothwell
2009-09-23  7:11 ` Lars Ellenberg
2009-09-23  7:32   ` Stephen Rothwell
     [not found]   ` <20090923071152.GA8000-pI6ZZpWkm2Ob3Om96lsyHpni2hclXnRB@public.gmane.org>
2009-09-23 11:12     ` Lars Ellenberg
     [not found]       ` <20090923111225.GC8000-pI6ZZpWkm2Ob3Om96lsyHpni2hclXnRB@public.gmane.org>
2009-09-23 11:56         ` Stephen Rothwell
2009-09-14  4:27 Stephen Rothwell
2009-09-14  6:25 ` Jens Axboe
2009-09-11  4:32 Stephen Rothwell
2009-09-11  5:30 ` Jens Axboe
2009-09-01  4:59 Stephen Rothwell
2009-09-01  5:30 ` Stephen Rothwell
2009-09-01  5:38   ` Jens Axboe
2009-09-01  8:13     ` Jens Axboe
2009-09-01  8:38       ` Stephen Rothwell
2009-07-07  3:49 Stephen Rothwell
2009-07-07  6:38 ` Jens Axboe
2009-07-07  6:45   ` Stephen Rothwell
2009-07-07 13:57   ` Christoph Hellwig
2009-07-07 14:31     ` Jens Axboe
2009-07-08  3:17   ` Stephen Rothwell
2009-07-08  6:55     ` Jens Axboe
2009-07-07 13:55 ` Christoph Hellwig
2009-07-08  0:41   ` Stephen Rothwell
2009-06-26  2:53 Stephen Rothwell
2009-06-26  4:34 ` NeilBrown
2009-06-26  4:39   ` Jens Axboe
2009-06-26  5:49     ` Neil Brown
2009-06-26  9:00       ` Jens Axboe
2009-05-13  4:04 Stephen Rothwell
2009-05-13  9:21 ` Tejun Heo
2009-05-13 12:07   ` James Bottomley
2009-05-15  0:45     ` Tejun Heo
2009-05-15  2:35       ` James Bottomley
2009-05-15  2:47         ` Tejun Heo
2009-05-15  3:24           ` James Bottomley
2009-05-15  3:38             ` Tejun Heo
2009-04-09  3:37 Stephen Rothwell
2009-04-14  2:35 ` Stephen Rothwell
2009-04-14  6:21   ` Jens Axboe
2009-04-14  6:26     ` Stephen Rothwell
2009-04-14  6:32       ` Jens Axboe
2008-11-26 10:29 Stephen Rothwell
2008-11-26 10:42 ` Ingo Molnar
2008-11-26 10:47   ` Jens Axboe
2008-11-26 11:16     ` Ingo Molnar
2008-11-26 11:20       ` Jens Axboe
2008-11-26 11:28         ` Ingo Molnar
2008-11-26 11:23       ` Mathieu Desnoyers
2008-11-26 11:25         ` Ingo Molnar
     [not found] <20081110145442.d60e57b7.sfr@canb.auug.org.au>
2008-11-10  4:13 ` malahal
2008-11-10  4:46 ` malahal
2008-11-10 12:12   ` Jens Axboe
2008-09-18  3:04 Stephen Rothwell
2008-09-18  4:31 ` Jens Axboe
2008-09-15  5:18 Stephen Rothwell
2008-09-15  5:38 ` Alex Dubov
2008-09-15 13:18   ` Jens Axboe
2008-09-03  6:15 Stephen Rothwell
2008-09-03  6:34 ` Jens Axboe
2008-09-03  7:04   ` Andrew Morton
2008-09-03  7:07     ` Jens Axboe
2008-09-03  8:50       ` Stephen Rothwell
2008-09-03 16:05       ` Andrew Morton
2008-09-03 16:27         ` Tejun Heo
2008-09-03 16:32           ` Andrew Morton
2008-09-03 17:29             ` Tejun Heo
2008-09-04  4:06               ` Andrew Morton
2008-08-29  5:07 Stephen Rothwell
2008-08-29  9:00 ` Jens Axboe
     [not found] <20080627165326.9222c841.sfr@canb.auug.org.au>
2008-06-27  7:00 ` Jens Axboe
2008-06-27  7:14   ` Jens Axboe

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=20090525143511.f9e76bdc.sfr@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=agk@redhat$(echo .)com \
    --cc=jens.axboe@oracle$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=martin.petersen@oracle$(echo .)com \
    --cc=mpatocka@redhat$(echo .)com \
    --cc=snitzer@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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