Re: [PATCH v2] ceph: add compression_hint mount option

From: Alex Markuze

Date: Mon Nov 30 2026 - 10:22:19 EST


Hi Daolong,

On the classic replicated OSD path, SETALLOCHINT can create an object
before WRITE handles a newer truncate sequence. WRITE then treats the
object as already present and can extend it to the truncate boundary
before writing the data.

For example, after a sparse file is shrunk, an absent object can have a
3 MiB object-local truncate boundary. The code path with the hint can
leave that object at 3 MiB after a 4 KiB direct write at the start of the
object; without the hint, the same write creates a 4 KiB object. The extra
logical bytes count toward the RADOS pool quota, so later CephFS writes
can hit ENOSPC sooner.

Please preserve the missing-object behavior for WRITE’s truncate
handling: the compression hint alone should not make WRITE treat the
object as already present.

Thanks,
Alex