From: myoungwon oh Date: Mon, 24 May 2021 14:39:46 +0000 (+0900) Subject: seastore: fix wrong operator X-Git-Tag: v17.1.0~1638^2~22 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=302afffbe0466bbc03428b4d8dd6694ca829e469;p=ceph.git seastore: fix wrong operator Signed-off-by: Myoungwon Oh --- diff --git a/src/crimson/os/seastore/randomblock_manager.h b/src/crimson/os/seastore/randomblock_manager.h index 3bd764b0d7b3..85d521a1dcc2 100644 --- a/src/crimson/os/seastore/randomblock_manager.h +++ b/src/crimson/os/seastore/randomblock_manager.h @@ -114,7 +114,7 @@ struct rbm_bitmap_block_t { void set_bit(uint64_t nr) { ceph_assert(buf.length()); char mask = BIT_CHAR_MASK(nr); - char *p = buf.c_str() + (nr >> BITS_PER_CHAR); + char *p = buf.c_str() + (nr / BITS_PER_CHAR); *p |= mask; } @@ -131,14 +131,14 @@ struct rbm_bitmap_block_t { void clear_bit(uint64_t nr) { ceph_assert(buf.length()); char mask = ~BIT_CHAR_MASK(nr); - char *p = buf.c_str() + (nr >> BITS_PER_CHAR); + char *p = buf.c_str() + (nr / BITS_PER_CHAR); *p &= mask; } bool is_allocated(uint64_t nr) { ceph_assert(buf.length()); char mask = BIT_CHAR_MASK(nr); - char *p = buf.c_str() + (nr >> BITS_PER_CHAR); + char *p = buf.c_str() + (nr / BITS_PER_CHAR); return *p & mask; }