Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp601003pxv; Thu, 22 Jul 2021 07:55:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys1+FhvHskg4HR1r5WSdAQFLToCzKJw9xt62ASzSth3pL1sc5B9kvNB5TN7aAifvy2Hcpo X-Received: by 2002:a05:6e02:1561:: with SMTP id k1mr176785ilu.25.1626965703876; Thu, 22 Jul 2021 07:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626965703; cv=none; d=google.com; s=arc-20160816; b=C/Opjs8dZCeip/CHAZvAYDvaZT17o69XXSUxaBLri3Idizv8trqBzHtRk+/eQ0BxjS FGns9Np+MnzyiN3A7pYr1APBkv2dz9XF1emUKPw+up6GO/vAnNzD3iNPEWkqg6zHbbPq cfRhGU1k337vo+AXLHCDw0uMV4VNlhzyI65NbqexdZ43AqUdHrWlSkkqKxmidssZ/VMW bPLz7NB2EnsR1WvqnwdrCbWmylj81wu+KBNDbuKuHrDJt4N42edtg2JlMWePY2ChtHt0 WNh5BCunzJzBOeCWCppDE+4NjbLp/3RyC6Oeo+LvSo5PLgzgsHpIBlNNrbol0AQh6QGf 578g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=LnMbw2mkJ2rfrgmnIw+dyyocBl3HdbUikgcBHkdS2rw=; b=bYIFVVWn5SO1Ks0CDY0LaKQAfCUPDjcplg3hSiXQLxweW8tRhYWdm69Y8mToYOMlcf GfHkvPatBNRUF/r9aKru6BKSn4/Om5WjVO9jdxdtAv5e0gcL56rqqcfsqGIQMJ3KjDJ0 Su+F7v8jkprHskMrNbZAHYR6zMj94Ds4QPtE1uDIIIGCPthvRb50KR5/KutPc3AXQZGg kzAV+IzdR+e/yQ6ir7KjZ54DdLqxSrzwQrZi8eMleuAQ2HuGSpHsvnk37fYO6Q1fL6Ee HDbf7MI+bUw0Pn4VjeWZ2OINo9NbbjWmKEqLIXOlxygXUXE4w8Up/LZ/27jA681HyWqJ vVfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si15234634ilv.81.2021.07.22.07.54.51; Thu, 22 Jul 2021 07:55:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232464AbhGVOLy (ORCPT + 99 others); Thu, 22 Jul 2021 10:11:54 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:36147 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232520AbhGVOLy (ORCPT ); Thu, 22 Jul 2021 10:11:54 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 16MEqNwP014107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Jul 2021 10:52:24 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 85DA415C37C0; Thu, 22 Jul 2021 10:52:23 -0400 (EDT) Date: Thu, 22 Jul 2021 10:52:23 -0400 From: "Theodore Ts'o" To: Jan Kara Cc: linux-ext4@vger.kernel.org Subject: Re: [PATCH 1/5] ext4: Support for checksumming from journal triggers Message-ID: References: <20210712154009.9290-1-jack@suse.cz> <20210712154009.9290-2-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210712154009.9290-2-jack@suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Jul 12, 2021 at 05:40:05PM +0200, Jan Kara wrote: > JBD2 layer support triggers which are called when journaling layer moves > buffer to a certain state. We can use the frozen trigger, which gets > called when buffer data is frozen and about to be written out to the > journal, to compute block checksums for some buffer types (similarly as > does ocfs2). This avoids unnecessary repeated recomputation of the > checksum (at the cost of larger window where memory corruption won't be > caught by checksumming) and is even necessary when there are > unsynchronized updaters of the checksummed data. > > So add argument to ext4_journal_get_write_access() and > ext4_journal_get_create_access() which describes buffer type so that > triggers can be set accordingly. This patch is mostly only a change of > prototype of the above mentioned functions and a few small helpers. Real > checksumming will come later. > > Signed-off-by: Jan Kara Looks good. I would have preferred mention of the change to ext4_walk_page_buffers in the commit description, but I guess this was considered one of the "few small helpers". :-) The WARN_ON_ONCE change in jbd2_journal_set_triggers is a somewhat tangentially-related unrelated change, but I think I understand why it was made. Reviewed-by: Theodore Ts'o - Ted