Skip to content

Commit e58e2f5

Browse files
committed
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. Signed-off-by: chunmei liu <[email protected]>
1 parent a3cc16a commit e58e2f5

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
@@ -17521,9 +17521,6 @@ int BlueStore::_do_write_v2(
1752117521
o->extent_map.fault_range(db, offset, length);
1752217522
BlueStore::Writer wr(this, txc, &wctx, o);
1752317523
wr.do_write(offset, bl);
17524-
o->extent_map.compress_extent_map(offset, length);
17525-
o->extent_map.dirty_range(offset, length);
17526-
o->extent_map.maybe_reshard(offset, offset + length);
1752717524
return r;
1752817525
}
1752917526

src/os/bluestore/Writer.cc

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

0 commit comments

Comments
 (0)