From 9d3236a7fec2a2cc238dbae6c0f9181fa3cc95a4 Mon Sep 17 00:00:00 2001 From: Christopher Hoffman Date: Wed, 19 Mar 2025 23:22:43 +0000 Subject: [PATCH] client: When creating WriteEncMgr take into account client_oc 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 --- src/client/Client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index c1b27c8244b..37f1c3bc0bc 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -12478,7 +12478,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 enc_mgr; if (buffered_write) { -- 2.39.5