drbd: drbd_bm_ALe_set_all(): Remove unused function
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
parent
69b6a3b159
commit
1a3cde4406
2 changed files with 0 additions and 48 deletions
|
@ -1661,49 +1661,3 @@ int drbd_bm_e_weight(struct drbd_conf *mdev, unsigned long enr)
|
||||||
spin_unlock_irqrestore(&b->bm_lock, flags);
|
spin_unlock_irqrestore(&b->bm_lock, flags);
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set all bits covered by the AL-extent al_enr.
|
|
||||||
* Returns number of bits changed. */
|
|
||||||
unsigned long drbd_bm_ALe_set_all(struct drbd_conf *mdev, unsigned long al_enr)
|
|
||||||
{
|
|
||||||
struct drbd_bitmap *b = mdev->bitmap;
|
|
||||||
unsigned long *p_addr, *bm;
|
|
||||||
unsigned long weight;
|
|
||||||
unsigned long s, e;
|
|
||||||
int count, i, do_now;
|
|
||||||
if (!expect(b))
|
|
||||||
return 0;
|
|
||||||
if (!expect(b->bm_pages))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
spin_lock_irq(&b->bm_lock);
|
|
||||||
if (BM_DONT_SET & b->bm_flags)
|
|
||||||
bm_print_lock_info(mdev);
|
|
||||||
weight = b->bm_set;
|
|
||||||
|
|
||||||
s = al_enr * BM_WORDS_PER_AL_EXT;
|
|
||||||
e = min_t(size_t, s + BM_WORDS_PER_AL_EXT, b->bm_words);
|
|
||||||
/* assert that s and e are on the same page */
|
|
||||||
D_ASSERT((e-1) >> (PAGE_SHIFT - LN2_BPL + 3)
|
|
||||||
== s >> (PAGE_SHIFT - LN2_BPL + 3));
|
|
||||||
count = 0;
|
|
||||||
if (s < b->bm_words) {
|
|
||||||
i = do_now = e-s;
|
|
||||||
p_addr = bm_map_pidx(b, bm_word_to_page_idx(b, s));
|
|
||||||
bm = p_addr + MLPP(s);
|
|
||||||
while (i--) {
|
|
||||||
count += hweight_long(*bm);
|
|
||||||
*bm = -1UL;
|
|
||||||
bm++;
|
|
||||||
}
|
|
||||||
bm_unmap(p_addr);
|
|
||||||
b->bm_set += do_now*BITS_PER_LONG - count;
|
|
||||||
if (e == b->bm_words)
|
|
||||||
b->bm_set -= bm_clear_surplus(b);
|
|
||||||
} else {
|
|
||||||
dev_err(DEV, "start offset (%lu) too large in drbd_bm_ALe_set_all\n", s);
|
|
||||||
}
|
|
||||||
weight = b->bm_set - weight;
|
|
||||||
spin_unlock_irq(&b->bm_lock);
|
|
||||||
return weight;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1310,8 +1310,6 @@ extern int drbd_bm_read(struct drbd_conf *mdev) __must_hold(local);
|
||||||
extern void drbd_bm_mark_for_writeout(struct drbd_conf *mdev, int page_nr);
|
extern void drbd_bm_mark_for_writeout(struct drbd_conf *mdev, int page_nr);
|
||||||
extern int drbd_bm_write(struct drbd_conf *mdev) __must_hold(local);
|
extern int drbd_bm_write(struct drbd_conf *mdev) __must_hold(local);
|
||||||
extern int drbd_bm_write_hinted(struct drbd_conf *mdev) __must_hold(local);
|
extern int drbd_bm_write_hinted(struct drbd_conf *mdev) __must_hold(local);
|
||||||
extern unsigned long drbd_bm_ALe_set_all(struct drbd_conf *mdev,
|
|
||||||
unsigned long al_enr);
|
|
||||||
extern size_t drbd_bm_words(struct drbd_conf *mdev);
|
extern size_t drbd_bm_words(struct drbd_conf *mdev);
|
||||||
extern unsigned long drbd_bm_bits(struct drbd_conf *mdev);
|
extern unsigned long drbd_bm_bits(struct drbd_conf *mdev);
|
||||||
extern sector_t drbd_bm_capacity(struct drbd_conf *mdev);
|
extern sector_t drbd_bm_capacity(struct drbd_conf *mdev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue