return rv;
}
-void md_bitmap_set_pages(struct bitmap *bitmap, unsigned long pages)
+static void bitmap_set_pages(struct bitmap *bitmap, unsigned long pages)
{
bitmap->counts.pages = pages;
}
-EXPORT_SYMBOL_GPL(md_bitmap_set_pages);
static int bitmap_get_stats(struct bitmap *bitmap, struct md_bitmap_stats *stats)
{
.sync_with_cluster = bitmap_sync_with_cluster,
.get_from_slot = bitmap_get_from_slot,
.copy_from_slot = bitmap_copy_from_slot,
+ .set_pages = bitmap_set_pages,
};
void mddev_set_bitmap_ops(struct mddev *mddev)
struct bitmap *(*get_from_slot)(struct mddev *mddev, int slot);
int (*copy_from_slot)(struct mddev *mddev, int slot, sector_t *lo,
sector_t *hi, bool clear_bits);
+ void (*set_pages)(struct bitmap *bitmap, unsigned long pages);
};
/* the bitmap API */
/* these are exported */
-void md_bitmap_set_pages(struct bitmap *bitmap, unsigned long pages);
void md_bitmap_free(struct bitmap *bitmap);
void md_bitmap_wait_behind_writes(struct mddev *mddev);
bm_lockres->flags |= DLM_LKF_NOQUEUE;
rv = dlm_lock_sync(bm_lockres, DLM_LOCK_PW);
if (!rv)
- md_bitmap_set_pages(bitmap, my_pages);
+ mddev->bitmap_ops->set_pages(bitmap, my_pages);
lockres_free(bm_lockres);
if (my_pages != stats.pages)