Skip to content

Commit e52e550

Browse files
authored
Merge pull request ceph#61762 from liu-chunmei/compress_extentmap
os/bluestore: fix do_write_v2 extentmap compress issue do_write_v2 insert extentmap by aligned offset which is adjusted in writer.do_write, if use original offset will cause extentmap can't do compress. Reviewed-by: Adam Kupczyk <[email protected]>
2 parents c370117 + e58e2f5 commit e52e550

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/os/bluestore/BlueStore.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17535,9 +17535,6 @@ int BlueStore::_do_write_v2(
1753517535
o->extent_map.fault_range(db, offset, length);
1753617536
BlueStore::Writer wr(this, txc, &wctx, o);
1753717537
wr.do_write(offset, bl);
17538-
o->extent_map.compress_extent_map(offset, length);
17539-
o->extent_map.dirty_range(offset, length);
17540-
o->extent_map.maybe_reshard(offset, offset + length);
1754117538
return r;
1754217539
}
1754317540

src/os/bluestore/Writer.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,9 @@ void BlueStore::Writer::do_write(
13771377
_collect_released_allocated();
13781378
// update statfs
13791379
txc->statfs_delta += statfs_delta;
1380+
onode->extent_map.compress_extent_map(location, data_end - location);
1381+
onode->extent_map.dirty_range(location, data_end-location);
1382+
onode->extent_map.maybe_reshard(location, data_end);
13801383
dout(25) << "result: " << std::endl << onode->print(pp_mode) << dendl;
13811384
}
13821385

0 commit comments

Comments
 (0)