We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6343ee7 + 0da7a2a commit 688df4bCopy full SHA for 688df4b
src/os/bluestore/BlueFS.cc
@@ -4224,10 +4224,12 @@ int BlueFS::truncate(FileWriter *h, uint64_t offset)/*_WF_L*/
4224
changed_extents = true;
4225
++p;
4226
} else {
4227
- // cut_off > p->length means that we misaligned the extent
4228
- ceph_assert(cut_off == p->length);
+ // Usually cut_off == p->length.
+ // Case cut_off > p->length means that we misaligned the extent
4229
+ // or alloc size changed in the meantime.
4230
+ // In both cases just leave extent untouched.
4231
fnode.allocated = (offset - x_off) + p->length;
- ++p; // leave extent untouched
4232
+ ++p;
4233
}
4234
while (p != fnode.extents.end()) {
4235
dirty.pending_release[p->bdev].insert(p->offset, p->length);
0 commit comments