the BufferHead offset should be "opos - bh->start()"
Fixes: https://tracker.ceph.com/issues/24484
Signed-off-by: dongdong tao <tdd21151186@gmail.com>
(cherry picked from commit
10f3204cca240c7172aef94b16fde203b33a19fd)
ldout(cct, 10) << "writex writing " << f_it->first << "~"
<< f_it->second << " into " << *bh << " at " << opos
<< dendl;
- uint64_t bhoff = bh->start() - opos;
+ uint64_t bhoff = opos - bh->start();
assert(f_it->second <= bh->length() - bhoff);
// get the frag we're mapping in