Re: [PATCH v3] ceph: add compression_hint mount option
From: Alex Markuze
Date: Wed Dec 02 2026 - 08:24:41 EST
Hi Daolong,
With a compression hint, ceph_osdc_new_request() allocates two ops for a
direct write but initializes only WRITE before allocating the messages. If
a message allocation fails, cleanup releases both slots before the hint
slot is initialized. A slot reused from a sparse read can still contain
its already-freed extent pointer, so this can double-free it. Please make
all op slots safe to release before a constructor failure, for both hint
positions.
The initial (1, -1ULL) truncate pair also puts the hint before WRITE. In
the experimental Crimson/BlueStore implementation at Ceph commit
6d531bf08b7c, a first direct write to a new file can then abort the OSD:
the hint creates the object, and WRITE queues a truncate to -1ULL, which
BlueStore rejects. The classic OSD normalizes this sentinel. Please
preserve the initial no-truncate semantics for Crimson as well, without
reintroducing the missing-object problem for real truncates.
Thanks,
Alex