]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: do sync read when 'client oc = false' 178/head
authorSage Weil <sage@inktank.com>
Mon, 1 Apr 2013 04:40:42 +0000 (21:40 -0700)
committerSage Weil <sage@inktank.com>
Mon, 1 Apr 2013 04:44:00 +0000 (21:44 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/client/Client.cc

index 18fd7aae4f429af19c9bf6aaa1016fa0099243ee..74647fb8ddaa5f808a6e62a736714b94c4d8c93a 100644 (file)
@@ -5631,7 +5631,8 @@ int Client::_read(Fh *f, int64_t offset, uint64_t size, bufferlist *bl)
     movepos = true;
   }
 
-  if (!conf->client_debug_force_sync_read && (have & CEPH_CAP_FILE_CACHE)) {
+  if (!conf->client_debug_force_sync_read &&
+      (cct->_conf->client_oc && (have & CEPH_CAP_FILE_CACHE))) {
 
     if (f->flags & O_RSYNC) {
       _flush_range(in, offset, size);