public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: NeilBrown <neilb@suse•de>
Cc: Goldwyn Rodrigues <rgoldwyn@suse•com>,
	linux-next@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: linux-next: build failure after merge of the md tree
Date: Tue, 3 Mar 2015 13:35:31 +1100	[thread overview]
Message-ID: <20150303133531.72f10682@canb.auug.org.au> (raw)
In-Reply-To: <20150302171149.0a62b072@canb.auug.org.au>

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

Hi Neil,

On Mon, 2 Mar 2015 17:11:49 +1100 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> On Mon, 2 Mar 2015 17:03:45 +1100 NeilBrown <neilb@suse•de> wrote:
> >
> > I think
> > +               bm_blocks = DIV_ROUND_UP(bm_blocks, 4096);
> > 
> > needs DIV_ROUND_UP_SECTOR_T()
> 
> I tried that and it was not sufficient.
> 
> > The first patch you identified adds that line.  The second relocates it.
> 
> The second also changes this:
> 
> bm_blocks = sector_div(bitmap->mddev->resync_max_sectors, (chunksize >> 9));
> 
> (added by the first) to this:
> 
> bm_blocks = bitmap->mddev->resync_max_sectors / (bitmap->mddev->bitmap_info.chunksize >> 9);
> 
> where bitmap->mddev->resync_max_sectors is a sector_t ...

So I applied this patch for today:

From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Tue, 3 Mar 2015 13:30:26 +1100
Subject: [PATCH] md/bitmap: use sector_div for sector_t divisions

Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
 drivers/md/bitmap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 23f575f0cd92..d40398404ab6 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -573,7 +573,8 @@ re_read:
 	if (bitmap->cluster_slot >= 0) {
 		long long bm_blocks;
 
-		bm_blocks = bitmap->mddev->resync_max_sectors / (bitmap->mddev->bitmap_info.chunksize >> 9);
+		bm_blocks = sector_div(bitmap->mddev->resync_max_sectors,
+				       bitmap->mddev->bitmap_info.chunksize >> 9);
 		bm_blocks = bm_blocks << 3;
 		bm_blocks = DIV_ROUND_UP_SECTOR_T(bm_blocks, 4096);
 		bitmap->mddev->bitmap_info.offset += bitmap->cluster_slot * (bm_blocks << 3);
-- 
2.1.4

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-03-03  2:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02  5:50 linux-next: build failure after merge of the md tree Stephen Rothwell
2015-03-02  6:03 ` NeilBrown
2015-03-02  6:11   ` Stephen Rothwell
2015-03-03  2:35     ` Stephen Rothwell [this message]
2015-03-04  2:44       ` NeilBrown
2015-03-04  2:48         ` Stephen Rothwell
2015-03-13  8:55       ` Guoqing Jiang
  -- strict thread matches above, loose matches on Subject: below --
2017-06-22  1:44 Stephen Rothwell
2017-07-03  1:52 ` Stephen Rothwell
2017-06-14  1:58 Stephen Rothwell
2012-09-25  3:31 Stephen Rothwell
2012-09-25  4:10 ` NeilBrown
2012-09-25  4:50   ` Stephen Rothwell
2012-04-19  2:55 Stephen Rothwell
2012-04-19  3:15 ` NeilBrown
2012-04-11  3:42 Stephen Rothwell
2012-04-11  3:54 ` H. Peter Anvin
2012-04-11  4:48 ` NeilBrown
2012-03-28  3:32 Stephen Rothwell
2012-03-28  4:07 ` NeilBrown
2011-10-11  5:29 Stephen Rothwell
2011-10-11  5:42 ` NeilBrown
2011-10-07  3:07 Stephen Rothwell
2011-10-07  3:34 ` NeilBrown

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=20150303133531.72f10682@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=neilb@suse$(echo .)de \
    --cc=rgoldwyn@suse$(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