]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: When creating WriteEncMgr take into account client_oc
authorChristopher Hoffman <choffman@redhat.com>
Wed, 19 Mar 2025 23:22:43 +0000 (23:22 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 5 Nov 2025 13:59:35 +0000 (13:59 +0000)
When determining if a write is buffered or not, take into account
the client_oc config. This option allows non-buffered writes when
caps normally used in buffered writes are present.

Fixes: https://tracker.ceph.com/issues/70568
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/client/Client.cc

index 27cdf27312c9dc08c9996116429d0b3bc5006df6..60f475b4d6948872b2a23ad1279eeb6ddb861c3d 100644 (file)
@@ -12545,7 +12545,7 @@ int64_t Client::_write(Fh *f, int64_t offset, uint64_t size, bufferlist bl,
   if (f->flags & O_DIRECT)
     have &= ~(CEPH_CAP_FILE_BUFFER | CEPH_CAP_FILE_LAZYIO);
 
-  bool buffered_write = (have & (CEPH_CAP_FILE_BUFFER | CEPH_CAP_FILE_LAZYIO));
+  bool buffered_write = (cct->_conf->client_oc && (have & (CEPH_CAP_FILE_BUFFER | CEPH_CAP_FILE_LAZYIO)));
   ceph::ref_t<WriteEncMgr> enc_mgr;
 
   if (buffered_write) {