From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D7ECC0218D for ; Fri, 31 Jan 2025 10:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:References:Content-Type: Content-Transfer-Encoding:In-Reply-To:From:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7DRdYruLuTGeDOp3T9CApmK93+wgaQobbfK2Y7ArqFM=; b=qeK2HkYoyaIRoiKB1GmYC7jIy9 WkE+b4T5gjIHpQvd+Ih2GjpjlUyv77iNTzE4c4FTQn9rn/HzFYrcm5P5plooc59XqV9yIc+fIZwAN Eyc9uwgm7xGKZY3/8q6VvqM2IeDiSoOyMq9xsIKrdYKENIYdEowVhhA5UXFtuDPQgcdLmwOK4EqUz 6cIK4rb8SuW6dc3t+xgl+c5DJc3uKq1uPZd4K53lBxjf5Nc0WvAa+ucz1ZUx9IVM3UGFGfuyNpj0w oCES0jvuk15yqkbDLNWNWmfPt1CrWVfwjgADm6hqzI0T58ZPPt5XBDmb/wmE9uRVr4jEF0KYhKOi+ 3hYkfGww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tdoHF-0000000AOnV-3ThU; Fri, 31 Jan 2025 10:29:33 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tdoHC-0000000AOmL-3CCD for linux-nvme@lists.infradead.org; Fri, 31 Jan 2025 10:29:32 +0000 Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20250131102922epoutp016da1631b0339dbc9f5f184442e64fc5a~fwD-1eXRU2783527835epoutp01S for ; Fri, 31 Jan 2025 10:29:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20250131102922epoutp016da1631b0339dbc9f5f184442e64fc5a~fwD-1eXRU2783527835epoutp01S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1738319362; bh=7DRdYruLuTGeDOp3T9CApmK93+wgaQobbfK2Y7ArqFM=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=Cx3PalL4DiokQv/BPJGipk832nhyfd9Y3+vj5XiSJF5sPnxWK7tPfyIQgpdU1O/fZ BbHASga9V8qTT+E6dzEcYTJpYNXRHhIIZzbp4Rj3YzjS61s58IdxS4lINCTAnpACly Aw/Y9ugfPJ+B2AchuCVFFBwAYDvPB8EizJithdQI= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20250131102921epcas5p1df271e2a76e61741daf442e23056a996~fwD-Eepfu2151321513epcas5p1X; Fri, 31 Jan 2025 10:29:21 +0000 (GMT) Received: from epsmgec5p1new.samsung.com (unknown [182.195.38.175]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4YksZR6tCPz4x9Pv; Fri, 31 Jan 2025 10:29:19 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmgec5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F9.5E.19710.FF5AC976; Fri, 31 Jan 2025 19:29:19 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20250131102919epcas5p382301978fa8c4b90b653eb319b7858b6~fwD9ihjw81285712857epcas5p3C; Fri, 31 Jan 2025 10:29:19 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20250131102919epsmtrp2625fcb350f65b6dfb1f05e1468c7b217~fwD9dfpm90770307703epsmtrp2k; Fri, 31 Jan 2025 10:29:19 +0000 (GMT) X-AuditID: b6c32a44-363dc70000004cfe-17-679ca5ffef20 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 05.77.33707.FF5AC976; Fri, 31 Jan 2025 19:29:19 +0900 (KST) Received: from [107.122.11.51] (unknown [107.122.11.51]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20250131102918epsmtip1b3413b2283500cdaeda4e9539fe6b040~fwD8CEDkU0826508265epsmtip1N; Fri, 31 Jan 2025 10:29:17 +0000 (GMT) Message-ID: <12ee6895-aafe-491e-8dea-c024a2a34563@samsung.com> Date: Fri, 31 Jan 2025 15:59:17 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 0/3] Btrfs checksum offload To: Christoph Hellwig Cc: josef@toxicpanda.com, dsterba@suse.com, clm@fb.com, axboe@kernel.dk, kbusch@kernel.org, linux-btrfs@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, gost.dev@samsung.com Content-Language: en-US From: Kanchan Joshi In-Reply-To: <20250130125306.GA19390@lst.de> Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBJsWRmVeSWpSXmKPExsWy7bCmuu7/pXPSDbbvsbBYfbefzWJS/wx2 iws/Gpksbh7YyWSxcvVRJos/Dw0tJh26xmix95a2xaXHK9gt5i97yu7A5TGx+R27x+WzpR6b VnWyeWxeUu+x+2YDm0ffllWMHuu3XGXxmLB5I6vH501yAZxR2TYZ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nl AOskAwAA X-CMS-MailID: 20250131102919epcas5p382301978fa8c4b90b653eb319b7858b6 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20250129141039epcas5p11feb1be4124c0db3c5223325924183a3 References: <20250129140207.22718-1-joshi.k@samsung.com> <20250129153524.GB5356@lst.de> <20250130125306.GA19390@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250131_022931_274755_B77B817C X-CRM114-Status: GOOD ( 20.85 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org On 1/30/2025 6:23 PM, Christoph Hellwig wrote: >> Difference is that FS does not have to attach any PI for offload. >> >> Offload is about the Host doing as little as possible, and the closest >> we get there is by setting PRACT bit. > But that doesn't actually work. The file system needs to be able > to verify the checksum for failing over to other mirrors, repair, > etc. Right. That sounds like reusing the existing code on detecting checksum-specific failure. So maybe that can be handled iff this gets any far. > Also if you trust the device to get things right you do not > need to use PI at all - SSDs or hard drives that support PI generally > use PI internally anyway, and PRACT just means you treat a format > with PI like one without. In other words - no need for an offload > here, you might as well just trust the device if you're not doing > end to end protection. Agree that device maybe implementing internal E2E, but that's not a contract to be honored. Host can't trust until device says it explicitly. Since Btrfs already has 'nodatasum' mount option, I assume there are deployments that prefer to optimize for checksum. I thought Btrfs will be more comfortable to give up (its own checksum tree) and exercise this more often if it certainly knows that device is also capable.