From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796217874; b=eJ0577z0KGsEoInAcrO8xyj0yXOQGfl+bHay23ijIZW9UzrX1YBf+MbQ/Kep9TYk5tv2 WMczrRpLrUsBU55dZcwq0GfxEGoG9lOGOZspM87g6ndOM3oNjUw9Wm6p+BszzYPnzXJaK eyPY2gH+d1xXNpINqyEEMzCrn/VAdfIpsyW4idEpc+sD1v0ldOBzsbRDQD64EfhZncBQJ YJlKr0mTe8x+gTuKPgy0IZDX25HeNgi/OmX5aHMju4OyArQx3z8pYUJNYLWf+SyJumxQA BkTamoTZJCcRscUbJDo2ffyO84Ir9F76WslhP+/U/jf2cVM2vvd6PW1iNiQ5VWTiDYQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796217874; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received: X-Received:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=G/KtQurOrJzA/fa/nc09U85Lq+0dATh40cKDIJZ04fs=; b=38PywjUjNLGt5/t1OkAXgNbRCL6KG3XijfpT+qPxasoK5WBroCdoB0wqqERyKEAoqRH4 ng43VgZPzFZi40GnDLdI3QIZw8liRsGfC83ceo3yYX/tnrKJLnabYyOgf4HtAdLXL0Odt o9nbnXq4FpGZtYdX2as90ImYgxKrNfpjmgSM+su3LOWOdFsR+jMbrrXagQ05MO//Zlkar XufEw8LmPOwSEbCjvYHiG4W9vQ4dcRFdmHPAKWxh5ShmnEnHGHFxdtjh852W4banA2Wlx SdVOqO9KZqIBFn9ltryfy0kzEm5RNBUWL6ruXXiQKeb4/ISmLzhhtZd7OwXtT6LDbQg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=H3Hzesvs; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=A0XT8wu5; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F859606A322 for ; Wed, 2 Dec 2026 13:24:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2F859606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=H3Hzesvs; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=A0XT8wu5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796217874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G/KtQurOrJzA/fa/nc09U85Lq+0dATh40cKDIJZ04fs=; b=H3HzesvsvAloBSaI8AnmSBhi0ob3OPfkMikrlZn8OPuY0ffqkSEFcH/iWMAD8w84iQf29b SDhDPOPyh/MIfj6Zl29GLOA8MhEkHcKd8stE4ydmNv2wbT/eJiNj2SdAMhDTiyarNGjVtg OvxEkgZHA7qnEOXPR1Lhy9hiXj1wr6Q= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-57-MdfcGIwrPKefSUpfm86Qvw-1; Wed, 2 Dec 2026 13:24:31 +0000 X-MC-Unique: MdfcGIwrPKefSUpfm86Qvw-1 X-Mimecast-MFC-AGG-ID: MdfcGIwrPKefSUpfm86Qvw_1796217870 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-6b6fb975053so6785478a12.0 for ; Wed, 02 Dec 2026 05:24:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1796217870; x=1796822670; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=G/KtQurOrJzA/fa/nc09U85Lq+0dATh40cKDIJZ04fs=; b=A0XT8wu522ZArPbqmeVpB0M/2rUWS0IpzZP61b2SjSlIDthWXzRIMfA2euWizXpMXA nifEu0tKlYSL346j7vxiF8kgD7VMzeH1c5SEyYIZKzkfmD35RP+IAzt1BMG9dcE7RDwZ N+Jrr3lReESbB5o6CDjBaiZO0kb9ecp1msc/0GqBOUDGGTOi5r63lOGwdCxjM6ciMvvk x+Eo0W6pUuENLlYqsAh70sZmET98+pKPS93ZIHPBxy0JE78pt5Nni+5fN7VCXk5mKEcF rU8lOqSp324bf5Zp+8ymEhwhIVY5JBAHo1nRFVY6ofnU1Il4OOeTELUE7Pb2ZaRkCePz nlWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796217870; x=1796822670; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=G/KtQurOrJzA/fa/nc09U85Lq+0dATh40cKDIJZ04fs=; b=HTgdl/AOsaKqcfDnbZn3qi/mjv3dhSwamiTh7sQexVdbzJJ78gVBGJBKLBH0zlZm9L IceYIogCeTm078rMT/w5lbRPM0PxV5KEz3tNplpcqsM+8SUVDo9VrD87vwIWqsJaVwcC SIzHKe9mDnLWa87m+ypKmCzxm/y1TF+udA/xsC1uaCMabb0qYq0G2rUgnCiHWooj9ITH IqynWIi4x+0GpFQa+V6WI51Vwh3SKbzPjyLnZOSepatoYOIPVvFNZJvSk77w+oE2RMN4 OmXwbAIEU0vBMuSvgxz42RVYhhGAqvQMpdu5OA7d/ER2+w6eWAYY34Hw8sddbpMUWy0m J16Q== X-Forwarded-Encrypted: i=1; AL+hErEX/PEXGKB08oSE0hBu7RNRCS0eRu2EKgJTsmNXxP1hXHx704ePwq3+zsRLkkv4x64qleg5lVkWfqYI7NM=@vger.kernel.org X-Gm-Message-State: APuU4Z8g2kB14RiA5jz/nwHuUhCnXr3vhTKqitqjM+wfJvnXvfhOU8lC X4GupfaM/O98qqnwNJd3YBI/TtEUf/NrPZoA4i/I9GIvqUuYNSU0bpc1sG8DGGw9Qe2ag3o3LZt JDqu9nKxbrX5uJIXvOv73u3qN2HvbJ6SFLpvPI73CtrF/l9UhoHZaUcvIy4eYKvQ2rg== X-Gm-Gg: AZFdTZfdgzVFXzwgwc9LflRH5IjgBP3QMJl1mOI0MBfwrIfLTWlwazyYU+IDfVdRpU5 8h4wI41+YVVIswbrXqsJm5G5lTKe74BMppfhEPJeojRooOUBziYHZ2+DEqXVLfg6/5aQlrIrVFg 8Vr0Vdx7uN8k2Z95fG352ELRG8woCe804pcAZLNSusOAMjgRUBc2a0wp8KSe441v7LW9B+7IS2/ 4r7DpFu80AmYjmurOfbiQ3hpQEJnIlToaJ4L+Luo8oz/KJtz3O3uJViICIEM8bWiGdto5MYCe6p DQ2JFi8TwFUwlu40shvGLHDUut0pwOnPoJENyQP+Jd0B1YC78rWcYalSY83KGnYBjl7eOysOQjD 7nq004qIZ5kH7ZLL/5C8zeMIn772rjdi71LMDatXwvEeAd041DXmCRlB6J484ZNOmR/fN2XvCyI zfSqYvgPBh0bcyZDeKMWkNqgposXu9wdkRwd9E1hhviIPfX2rPpTC/xs4UlEw13/RzXA8QUUmk1 KZZqJrInZZ2qY8EYMl3ivUaGCbfIcBWXTEf8wXkORc6nH2QqkdJ X-Received: by 2002:a05:6402:1c08:b0:6ba:bdfe:e47a with SMTP id 4fb4d7f45d1cf-6babdfee5c5mr18549313a12.41.1796217870052; Wed, 02 Dec 2026 05:24:30 -0800 (PST) X-Received: by 2002:a05:6402:1c08:b0:6ba:bdfe:e47a with SMTP id 4fb4d7f45d1cf-6babdfee5c5mr18549303a12.41.1796217869669; Wed, 02 Dec 2026 05:24:29 -0800 (PST) Received: from cluster.. (4f.55.790d.ip4.static.sl-reverse.com. [13.121.85.79]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6bc6192392fsm721589a12.15.2026.12.02.05.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 05:24:29 -0800 (PST) From: Alex Markuze To: Daolong Zhang Cc: Ilya Dryomov , Viacheslav Dubeyko , ceph-devel@vger.kernel.org, Jonathan Corbet , Shuah Khan , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] ceph: add compression_hint mount option Date: Wed, 2 Dec 2026 13:24:27 +0000 Message-Id: <20261202132427.599967-1-amarkuze@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <1796092809.6B0E3386.002.4jdlVG5Ycqz5sWq@fangwg01> References: <1796092809.6B0E3386.002.4jdlVG5Ycqz5sWq@fangwg01> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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