]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: remove fadvise_flags from WriteContext
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 27 Sep 2016 03:06:29 +0000 (11:06 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 28 Sep 2016 00:32:37 +0000 (08:32 +0800)
Currently fadvise_flags is only used to check whether
buffered write is necessary, so there is no need
to keep it in the WriteContext as we have already
pre-calculated and kept the buffered field instead.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index a6de825ef1695c84b3e42279123d197fcc67459f..6416f75a30cc7a1e9ba0f183279a66b70f9a59af 100644 (file)
@@ -7458,8 +7458,7 @@ int BlueStore::_do_write(
   uint64_t end = offset + length;
 
   WriteContext wctx;
-  wctx.fadvise_flags = fadvise_flags;
-  if (wctx.fadvise_flags & CEPH_OSD_OP_FLAG_FADVISE_WILLNEED) {
+  if (fadvise_flags & CEPH_OSD_OP_FLAG_FADVISE_WILLNEED) {
     dout(20) << __func__ << " will do buffered write" << dendl;
     wctx.buffered = true;
   }
index 362e0316cf9f10a9d4e4ec03f50d94a6a647e211..00818a3b522ce8cc345938419e38e83378104d48 100644 (file)
@@ -1724,7 +1724,6 @@ private:
   // write ops
 
   struct WriteContext {
-    unsigned fadvise_flags = 0;  ///< write flags
     bool buffered = false;       ///< buffered write
     bool compress = false;       ///< compressed write
     uint64_t comp_blob_size = 0; ///< target compressed blob size