Lines Matching refs:blocks
227 static int __bitmap_resize(struct bitmap *bitmap, sector_t blocks,
1489 sector_t offset, sector_t *blocks,
1519 sector_t blocks; in bitmap_daemon_work() local
1588 bmc = md_bitmap_get_counter(counts, block, &blocks, 0); in bitmap_daemon_work()
1636 sector_t offset, sector_t *blocks, in md_bitmap_get_counter() argument
1657 *blocks = csize - (offset & (csize - 1)); in md_bitmap_get_counter()
1667 *blocks = csize - (offset & (csize - 1)); in md_bitmap_get_counter()
1694 sector_t blocks; in bitmap_start_write() local
1698 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 1); in bitmap_start_write()
1731 offset += blocks; in bitmap_start_write()
1732 if (sectors > blocks) in bitmap_start_write()
1733 sectors -= blocks; in bitmap_start_write()
1748 sector_t blocks; in bitmap_end_write() local
1753 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 0); in bitmap_end_write()
1779 offset += blocks; in bitmap_end_write()
1780 if (sectors > blocks) in bitmap_end_write()
1781 sectors -= blocks; in bitmap_end_write()
1788 sector_t *blocks, bool degraded) in __bitmap_start_sync() argument
1794 *blocks = 1024; in __bitmap_start_sync()
1800 bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); in __bitmap_start_sync()
1819 sector_t *blocks, bool degraded) in bitmap_start_sync() argument
1831 *blocks = 0; in bitmap_start_sync()
1832 while (*blocks < (PAGE_SIZE>>9)) { in bitmap_start_sync()
1836 *blocks += blocks1; in bitmap_start_sync()
1843 sector_t *blocks, bool aborted) in __bitmap_end_sync() argument
1849 *blocks = 1024; in __bitmap_end_sync()
1853 bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); in __bitmap_end_sync()
1874 sector_t *blocks) in bitmap_end_sync() argument
1876 __bitmap_end_sync(mddev->bitmap, offset, blocks, true); in bitmap_end_sync()
1886 sector_t blocks; in bitmap_close_sync() local
1893 __bitmap_end_sync(bitmap, sector, &blocks, false); in bitmap_close_sync()
1894 sector += blocks; in bitmap_close_sync()
1902 sector_t blocks; in bitmap_cond_end_sync() local
1922 __bitmap_end_sync(bitmap, s, &blocks, false); in bitmap_cond_end_sync()
1923 s += blocks; in bitmap_cond_end_sync()
1934 sector_t sector, blocks = 0; in bitmap_sync_with_cluster() local
1937 __bitmap_end_sync(bitmap, sector, &blocks, false); in bitmap_sync_with_cluster()
1938 sector += blocks; in bitmap_sync_with_cluster()
1940 WARN((blocks > new_lo) && old_lo, "alignment is not correct for lo\n"); in bitmap_sync_with_cluster()
1943 bitmap_start_sync(mddev, sector, &blocks, false); in bitmap_sync_with_cluster()
1944 sector += blocks; in bitmap_sync_with_cluster()
1946 WARN((blocks > new_hi) && old_hi, "alignment is not correct for hi\n"); in bitmap_sync_with_cluster()
2132 sector_t blocks = mddev->resync_max_sectors; in __bitmap_create() local
2199 err = __bitmap_resize(bitmap, blocks, mddev->bitmap_info.chunksize, in __bitmap_create()
2251 sector_t blocks; in bitmap_load() local
2252 bitmap_start_sync(mddev, sector, &blocks, false); in bitmap_load()
2253 sector += blocks; in bitmap_load()
2389 static int __bitmap_resize(struct bitmap *bitmap, sector_t blocks, in __bitmap_resize() argument
2439 chunks = DIV_ROUND_UP_SECTOR_T(blocks, 1 << chunkshift); in __bitmap_resize()
2448 chunks = DIV_ROUND_UP_SECTOR_T(blocks, 1 << chunkshift); in __bitmap_resize()
2492 blocks = min(old_counts.chunks << old_counts.chunkshift, in __bitmap_resize()
2517 blocks = old_counts.chunks << old_counts.chunkshift; in __bitmap_resize()
2525 for (block = 0; block < blocks; ) { in __bitmap_resize()
2596 static int bitmap_resize(struct mddev *mddev, sector_t blocks, int chunksize, in bitmap_resize() argument
2604 return __bitmap_resize(bitmap, blocks, chunksize, init); in bitmap_resize()