Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp646306lqo; Wed, 8 May 2024 10:17:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXEKZUxC5zdK2DsBpZEnpHXh+KBj9+qyzDDW7pFfaoxT9mL+/0wfn+hdOgpzEGhC2EGpZQbmPpHkvnR/+RBxb/HfJNXI7asUrpT1X+RxQ== X-Google-Smtp-Source: AGHT+IFeV8JlLtrJGkRYnuejU4quLlUBCeAJJFbg0UpRyiFWJoqh/bXoQw+cFW/j+C07b7Bq47S5 X-Received: by 2002:a17:906:7c59:b0:a59:c62c:344d with SMTP id a640c23a62f3a-a5a115e7606mr22638566b.9.1715188675784; Wed, 08 May 2024 10:17:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715188675; cv=pass; d=google.com; s=arc-20160816; b=i0zXUdNLfjkx2xlcIp5tMUe1QPpOB/km3pdxay7POIOS+kutgfa19Clk0vjFhsRD0S 10zu+CORaDMXOVdMP5vEr2UgfcCEZTnckYm9810PsXYFsySEnfliynq46zZ1AzOU4Pc6 OSKe0VkeWcETTmEMR0EZKuGNuqo62wl5DqWIpdbvi3plM5f5dzC7O2SQVvWw3yEpaKi2 Hmbe9NkfM5rYnfJWRxGj0sioIBqxYP6iR1pOXBFoexIY8AFyUFPamihklVnJXB+LmbPB qihEJL32VzT6l3ZU7rgjDWSdvfuQ9djoKJkiF9dI80EjcWFF5n6pYR9dxJO3Jkr19nyD sy4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=RgumTHjw5lWA0kR5RCBEM/DVrmph4hHsyV7IvxPwa1U=; fh=B1CpgzU4wRo+cP8nXvho9P74SvxEGEjq21gEGqpMIE0=; b=WFE8mOjWJcKs3ZpYoAeSzjAV7hDFcPgQOxHWjbsPuv6pIfKovBv4eOr70kwXIl+eJO dpQSBVyEyvu9PxiivAMMGUi9eJcMN4kyRaHLoS795Cd1QwY3QKTcuX7TC1IY0QxJCjBE qnkTYkrTxGIRq7J4IKbFEDVjz2trDlqGvAO1sDTs+U3KDzV+B62x1XF/FJaemJ8RCQFJ tl8X0OoRIc4qwWfvwvgGdpZV3y5sjQeocXjmWcbmNk1rqHdPvTRuy7yYayK+mw+YW1Cy tYOXOJKWfK76XqIjlaOqbU54vNOvXjXms9tSZ+F6XYkPGoU76VBBArtOsQpMvft0k7y3 Kd/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="AzTUe/15"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-173610-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v27-20020a1709060b5b00b00a59a0144700si5856769ejg.383.2024.05.08.10.17.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 10:17:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173610-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="AzTUe/15"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-173610-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 82D341F2488C for ; Wed, 8 May 2024 17:17:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B774128815; Wed, 8 May 2024 17:17:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AzTUe/15" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5740C63E for ; Wed, 8 May 2024 17:17:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715188663; cv=none; b=kkF6AM5tHKPC1cPNAEyndSsIgeLyAgWWpyfqmKBlHwHcogzP9D16gcU9RHmhQcDhlVhFVTNw2tjHM1O0LDGIKKCmYpZUoHCiqDeMvra1Pv5e7gQrOFTUNNUjTDjLklLkxiZ6A3VwUmRwthbT9ujQPJdgcKjiv/io/R3gfCZCkRY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715188663; c=relaxed/simple; bh=Kxn1OpXajAC4QAVxlaCCK4ZVHRi/UjZM97fUkWUoxJE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=PLTle7Dju4HcHYT7RSkaRKeWvI7qJqL7SGY699d4l1o67eV6AJOE7dh7BTiGx9gqGIgL5VJhQynBQz6zXeV+rz+FsA6/GpjOIEuxPaNsZofU+VbSadM/58kX3y27YZ6gIamps7eXyxhc0GlxyUVQow9YH4DWVWOw3FRZDcBhByo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=AzTUe/15; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715188661; 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: in-reply-to:in-reply-to:references:references; bh=RgumTHjw5lWA0kR5RCBEM/DVrmph4hHsyV7IvxPwa1U=; b=AzTUe/15julYSZIpXWc9dWrh9ihMCAGi5cjUr6IPeIfCQQaA1inLTAR8f5VNqZ8TUeiAdi yeAlrhFJceZ63+oMCVpl0khLfl6mLI/ptx0jz2qT/SBmO2BvxU6P0uiuRFvW+JsQ3V5sSY GPsAM2jutWfjIKGVGnrsksXpnPsA6Lg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-650-xjcmPchrNO2ZGK2OhCc-NQ-1; Wed, 08 May 2024 13:17:36 -0400 X-MC-Unique: xjcmPchrNO2ZGK2OhCc-NQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 29F60101A551; Wed, 8 May 2024 17:17:35 +0000 (UTC) Received: from file1-rdu.file-001.prod.rdu2.dc.redhat.com (unknown [10.11.5.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BCD8A1C066AC; Wed, 8 May 2024 17:17:34 +0000 (UTC) Received: by file1-rdu.file-001.prod.rdu2.dc.redhat.com (Postfix, from userid 12668) id 9EA9C30C2BDF; Wed, 8 May 2024 17:17:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by file1-rdu.file-001.prod.rdu2.dc.redhat.com (Postfix) with ESMTP id 986D73E5E0; Wed, 8 May 2024 19:17:34 +0200 (CEST) Date: Wed, 8 May 2024 19:17:34 +0200 (CEST) From: Mikulas Patocka To: Fan Wu cc: corbet@lwn.net, zohar@linux.ibm.com, jmorris@namei.org, serge@hallyn.com, tytso@mit.edu, ebiggers@kernel.org, axboe@kernel.dk, agk@redhat.com, snitzer@kernel.org, eparis@redhat.com, paul@paul-moore.com, linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, fsverity@lists.linux.dev, linux-block@vger.kernel.org, dm-devel@lists.linux.dev, audit@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v18 12/21] dm: add finalize hook to target_type In-Reply-To: <1714775551-22384-13-git-send-email-wufan@linux.microsoft.com> Message-ID: References: <1714775551-22384-1-git-send-email-wufan@linux.microsoft.com> <1714775551-22384-13-git-send-email-wufan@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 On Fri, 3 May 2024, Fan Wu wrote: > This patch adds a target finalize hook. > > The hook is triggered just before activating an inactive table of a > mapped device. If it returns an error the __bind get cancelled. > > The dm-verity target will use this hook to attach the dm-verity's > roothash metadata to the block_device struct of the mapped device. > > Signed-off-by: Fan Wu Hi Why not use the preresume callback? Is there some reason why do we need a new callback instead of using the existing one? Mikulas