linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jgq516@gmail.com
To: neilb@suse.de, rgoldwyn@suse.de
Cc: linux-raid@vger.kernel.org, Guoqing Jiang <gqjiang@suse.com>
Subject: [PATCH 1/1] Make bm_blocks to match previous semantic
Date: Tue, 17 Mar 2015 10:40:30 +0800	[thread overview]
Message-ID: <1426560030-16152-1-git-send-email-jgq516@gmail.com> (raw)

From: Guoqing Jiang <gqjiang@suse.com>

The bm_blocks is modified by commit fe60ce (md/bitmap: use
sector_div for sector_t divisions), but it makes bm_blocks
has different value which is changed from like "a/b" to "a%b",
need to correct this to make sure cluster-md still works.

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
---
This is against for-next branch.

 drivers/md/bitmap.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 501f83f..ea9c685 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -571,11 +571,10 @@ static int bitmap_read_sb(struct bitmap *bitmap)
 re_read:
 	/* If cluster_slot is set, the cluster is setup */
 	if (bitmap->cluster_slot >= 0) {
-		sector_t bm_blocks;
-		sector_t resync_sectors = bitmap->mddev->resync_max_sectors;
+		sector_t bm_blocks = bitmap->mddev->resync_max_sectors;
 
-		bm_blocks = sector_div(resync_sectors,
-				       bitmap->mddev->bitmap_info.chunksize >> 9);
+		sector_div(bm_blocks,
+				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);
-- 
1.7.12.4


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17  2:40 jgq516 [this message]
2015-03-17 22:57 ` [PATCH 1/1] Make bm_blocks to match previous semantic NeilBrown
2015-03-19  3:50   ` Guoqing Jiang
2015-03-20 22:37     ` NeilBrown
2015-03-24 14:27       ` Goldwyn Rodrigues

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=1426560030-16152-1-git-send-email-jgq516@gmail.com \
    --to=jgq516@gmail.com \
    --cc=gqjiang@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=rgoldwyn@suse.de \
    /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).