summaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2009-04-20 19:59:09 +0000
committerSteve French <sfrench@us.ibm.com>2009-04-20 19:59:09 +0000
commitcbb7fe129bb2b836083ebcc256c43faff4b48cc2 (patch)
tree65998c06e712be5f7cb72543a7c0cc2d0b1b4459 /drivers/md/bitmap.c
parent7b0c8fcff47a885743125dd843db64af41af5a61 (diff)
parenta939b96cccdb65df80a52447ec8e4a6d79c56dbb (diff)
downloadkernel-crypto-cbb7fe129bb2b836083ebcc256c43faff4b48cc2.tar.gz
kernel-crypto-cbb7fe129bb2b836083ebcc256c43faff4b48cc2.tar.xz
kernel-crypto-cbb7fe129bb2b836083ebcc256c43faff4b48cc2.zip
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index f8a9f7ab2cb..1fb91edc7de 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1479,6 +1479,7 @@ void bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector)
s += blocks;
}
bitmap->last_end_sync = jiffies;
+ sysfs_notify(&bitmap->mddev->kobj, NULL, "sync_completed");
}
static void bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed)
@@ -1589,7 +1590,7 @@ void bitmap_destroy(mddev_t *mddev)
int bitmap_create(mddev_t *mddev)
{
struct bitmap *bitmap;
- unsigned long blocks = mddev->resync_max_sectors;
+ sector_t blocks = mddev->resync_max_sectors;
unsigned long chunks;
unsigned long pages;
struct file *file = mddev->bitmap_file;
@@ -1631,8 +1632,8 @@ int bitmap_create(mddev_t *mddev)
bitmap->chunkshift = ffz(~bitmap->chunksize);
/* now that chunksize and chunkshift are set, we can use these macros */
- chunks = (blocks + CHUNK_BLOCK_RATIO(bitmap) - 1) /
- CHUNK_BLOCK_RATIO(bitmap);
+ chunks = (blocks + CHUNK_BLOCK_RATIO(bitmap) - 1) >>
+ CHUNK_BLOCK_SHIFT(bitmap);
pages = (chunks + PAGE_COUNTER_RATIO - 1) / PAGE_COUNTER_RATIO;
BUG_ON(!pages);