This bug introduce by commit:
b0b4b6de362f0edf. This commit forget this
case which overwrite(0, bluestore_min_alloc_size).
For this case it need a new extent rather than WAL.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
bool shared_head = false;
bool shared_tail = false;
uint64_t orig_end = orig_offset + orig_length;
- if (orig_offset / min_alloc_size == (orig_end - 1)/ min_alloc_size) {
+ if (orig_offset / min_alloc_size == (orig_end - 1)/ min_alloc_size && (orig_length != min_alloc_size)) {
// we fall within the same block
offset = orig_offset - orig_offset % min_alloc_size;
length = 0;