[PATCH v4 0/2] ceph: add compression_hint mount option

From: Daolong Zhang

Date: Wed Dec 02 2026 - 22:18:48 EST


This series adds support for the
compression_hint=<none|compressible|incompressible> mount option to the
CephFS kernel client, along with a prerequisite libceph fix to ensure
uninitialized op slots in multi-op OSD requests are safe to release on
early constructor failures.

Changes since v3:
- Add patch 1/2 to zero req->r_ops in ceph_osdc_alloc_request() (and
clear op->extent.sparse_ext after kfree() in osd_req_op_data_release())
so early failures in ceph_osdc_new_request() or callers cannot
double-free stale sparse_ext pointers or touch uninitialized op slots.
- Always place CEPH_OSD_OP_SETALLOCHINT after WRITE (including on the
initial (1, -1ULL) sentinel) so that SETALLOCHINT never creates an
object before WRITE evaluates its truncate fields on either classic
OSDs or Crimson/BlueStore OSDs. This also simplifies the CephFS write
paths.

Changes since v2:
- Preserve missing-object behavior for WRITE's truncate handling by
placing SETALLOCHINT after WRITE instead of creating an absent object
before WRITE runs.
- Rebase onto latest ceph-client/testing (3f90412e989c).

Changes since v1:
- Preserve existing compression_hint across remount when the option is
omitted, while allowing compression_hint=none to clear it explicitly.
- Rebase onto latest ceph-client/testing.

Daolong Zhang (2):
libceph: zero r_ops slots on request allocation
ceph: add compression_hint mount option

Documentation/filesystems/ceph.rst | 13 +++++++
fs/ceph/addr.c | 62 ++++++++++++++++++++++--------
fs/ceph/file.c | 30 ++++++++++++---
fs/ceph/super.c | 51 ++++++++++++++++++++++++
fs/ceph/super.h | 1 +
net/ceph/osd_client.c | 4 +-
6 files changed, 139 insertions(+), 22 deletions(-)

--
2.48.1