]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueFS: convert all read/write IO to direct IO. 9533/head
authorJianjian Huo <jianjian.huo@ssi.samsung.com>
Thu, 19 May 2016 22:11:33 +0000 (15:11 -0700)
committerJianjian Huo <jianjian.huo@ssi.samsung.com>
Tue, 7 Jun 2016 01:11:41 +0000 (18:11 -0700)
RocksDB is the sole user of BlueFS, after BlueFS uses direct IO,
RocksDB will have to use its own block cache to cache raw data
blocks.

Signed-off-by: Jianjian Huo <jianjian.huo@ssi.samsung.com>
src/os/bluestore/BlueFS.cc

index ff1dc71b94475cc5c14a9de1d5c48c8cccbefd7e..da0ff9a4c73c1394995455c5abc57d410c51f8a9 100644 (file)
@@ -738,7 +738,7 @@ int BlueFS::_read_random(
     }
     dout(20) << __func__ << " read buffered " << x_off << "~" << l << " of "
               << *p << dendl;
-    int r = bdev[p->bdev]->read_random(p->offset + x_off, l, out, true);
+    int r = bdev[p->bdev]->read_random(p->offset + x_off, l, out, false);
     assert(r == 0);
     off += l;
     len -= l;
@@ -797,7 +797,7 @@ int BlueFS::_read(
       dout(20) << __func__ << " fetching " << x_off << "~" << l << " of "
               << *p << dendl;
       int r = bdev[p->bdev]->read(p->offset + x_off, l, &buf->bl, ioc[p->bdev],
-                                 true);
+                                 false);
       assert(r == 0);
     }
     left = buf->get_buf_remaining(off);
@@ -1121,7 +1121,7 @@ int BlueFS::_flush_range(FileWriter *h, uint64_t offset, uint64_t length)
       h->tail_block.substr_of(bl, bl.length() - tail, tail);
       t.append_zero(super.block_size - tail);
     }
-    bdev[p->bdev]->aio_write(p->offset + x_off, t, h->iocv[p->bdev], true);
+    bdev[p->bdev]->aio_write(p->offset + x_off, t, h->iocv[p->bdev], false);
     bloff += x_len;
     length -= x_len;
     ++p;