aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-20 08:37:37 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-20 08:37:37 -0700
commit2edbdd1266784495979576c4ab4ef294c29bad27 (patch)
treefd4909b58e783145f19cde650e7d4d16daa36b21 /drivers/md/bitmap.c
parenta5432f5ad43822802ba6f8ba8662ca6361712044 (diff)
parent1f59390339f263c0fe7908fbe54466dbf3a64b58 (diff)
downloadkernel_samsung_smdk4412-2edbdd1266784495979576c4ab4ef294c29bad27.zip
kernel_samsung_smdk4412-2edbdd1266784495979576c4ab4ef294c29bad27.tar.gz
kernel_samsung_smdk4412-2edbdd1266784495979576c4ab4ef294c29bad27.tar.bz2
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: md: support bitmaps on RAID10 arrays larger then 2 terabytes md: update sync_completed and reshape_position even more often. md: improve usefulness and accuracy of sysfs file md/sync_completed. md: allow setting newly added device to 'in_sync' via sysfs. md: tiny md.h cleanups
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 f8a9f7a..1fb91ed 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);