From: Jonathan Brassow Subject: [PATCH 2 of 8] md minor updates Date: Fri, 10 Dec 2010 17:23:48 -0600 Message-ID: <201012102323.oBANNmrg019542@hydrogen.msp.redhat.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: dm-devel@redhat.com Cc: agk@redhat.com List-Id: dm-devel.ids Patch name: md-minor-updates.patch Changes from e384e58549a2e9a83071ad80280c1a9053cfd84c that should be kept. (i.e. those cosmetic changes that are unrelated to dm dirty log support. Signed-off-by: Jonathan Brassow Index: linux-2.6/drivers/md/bitmap.c =================================================================== --- linux-2.6.orig/drivers/md/bitmap.c +++ linux-2.6/drivers/md/bitmap.c @@ -925,11 +925,11 @@ static int bitmap_init_from_disk(struct printk(KERN_INFO "%s: bitmap file is out of date, doing full " "recovery\n", bmname(bitmap)); - bytes = (chunks + 7) / 8; + bytes = DIV_ROUND_UP(bitmap->chunks, 8); if (!bitmap->mddev->bitmap_info.external) bytes += sizeof(bitmap_super_t); - num_pages = (bytes + PAGE_SIZE - 1) / PAGE_SIZE; + num_pages = DIV_ROUND_UP(bytes, PAGE_SIZE); if (file && i_size_read(file->f_mapping->host) < bytes) { printk(KERN_INFO "%s: bitmap file too short %lu < %lu\n",