]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc: Fix the wrong BufferHead offset 22495/head
authordongdong tao <tdd21151186@gmail.com>
Mon, 28 May 2018 21:44:59 +0000 (05:44 +0800)
committerdongdong tao <tdd21151186@gmail.com>
Sun, 10 Jun 2018 15:36:02 +0000 (23:36 +0800)
the BufferHead offset should be "opos - bh->start()"

Fixes: https://tracker.ceph.com/issues/24484
Signed-off-by: dongdong tao <tdd21151186@gmail.com>
src/osdc/ObjectCacher.cc

index 50f9a8d6a6c07de069bcb044606fc2eff1258c51..6b58c56c1ccb933323c180e1ca8621257f3268d3 100644 (file)
@@ -1728,7 +1728,7 @@ int ObjectCacher::writex(OSDWrite *wr, ObjectSet *oset, Context *onfreespace,
       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