Skip to content

Commit 1787574

Browse files
Merge pull request ceph#61882 from liu-chunmei/fault_range
os/bluestore: fix fault_range for _do_write_v2 Reviewed-by: Adam Kupczyk <[email protected]>
2 parents 0fac673 + acc80ad commit 1787574

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/os/bluestore/BlueStore.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17601,7 +17601,9 @@ int BlueStore::_do_write_v2(
1760117601
if (bl.length() != length) {
1760217602
bl.splice(length, bl.length() - length);
1760317603
}
17604-
o->extent_map.fault_range(db, offset, length);
17604+
uint64_t start = p2align(offset, min_alloc_size);
17605+
uint64_t end = p2roundup(offset + length, min_alloc_size);
17606+
o->extent_map.fault_range(db, start, end - start);
1760517607
BlueStore::Writer wr(this, txc, &wctx, o);
1760617608
wr.do_write(offset, bl);
1760717609
return r;

0 commit comments

Comments
 (0)