Re: [PATCH v4 0/2] ceph: add compression_hint mount option
From: Xiubo Li
Date: Thu Dec 03 2026 - 21:47:40 EST
Hi Daolong,
> I'll send v4 shortly.
>
BTW, I didn't find the 2/2 patch for V4 series from my mail box. It
seems lost for some reason.
Just read and get it from
https://lore.kernel.org/ceph-devel/1796267904.6B10DF80.000.4jg0FX4g0sz30hc6@fangwg01/T/#t
Tested against a BlueStore OSD with passive/aggressive compression:
buffered, O_DIRECT, AIO and sync writes, the writepages mempool fallback,
the snapshot writeback path, fscrypt RMW, uninline and the AIO
-EOLDSNAPC retry all carry the hint as the last op, and the OSD
compresses (or doesn't) as expected. fsx and fsstress pass.
Reviewed-by: Xiubo Li <xiubo.li@xxxxxxxxx>
Tested-by: Xiubo Li <xiubo.li@xxxxxxxxx>
BRs
Xiubo
Daolong Zhang <dlzhangak@xxxxxxxxxxxxxx> 于2026年12月3日周四 04:18写道:
>
> 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
>
>