Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2974077ybv; Mon, 24 Feb 2020 15:36:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxU1f0pFePwsRcQ+mZjKy+uZtWvpUM5CO279jY+7urxxNAMjHivQPGV7nPKwT4wgMrNuWGR X-Received: by 2002:a05:6808:643:: with SMTP id z3mr1224359oih.19.1582587368862; Mon, 24 Feb 2020 15:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582587368; cv=none; d=google.com; s=arc-20160816; b=DYgJHzdNrm14pDmWWXdJu2wHAobFWcIhoeHPhsfiMYP9GSDkF/6Q/QRD7BnMrlWBV4 13g1CvJMYiDBGRgVyA2bX1p6bU9vRcDLseuZ6WK2CjYKbkriOeTx3E4imVc1v9rJ0RH6 e/1G9k7DMdY4pFVWJUyBBHxIWk4hN/7lWRuFgQ/wiPsnSbgJ5N0zLN6B55dUVqFjoz7o n3T8bCysUPB1z+4Yx2QGmIvQ0s59rgm76wJJqO7SQd9Yxd5js47JBkUhYBDm12jTQ8Wn 9YaW+43EKAin7EHtRqsb3zH03dSIYXAxoeS4847YNx550Ja5ARM6M0zYaHiy9wBZRYwI 70/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=PY3LO7INDVp+w+EyWwMiX5Boc/JVIKXMjl3FPvBvaMU=; b=cknIGYh/I7MVH02hI6NK7DZKHjr9b8gEZqdvYMXGInwOvzoKDVfNOvi0V5Gyuv72uh F2hNNjNIYlCaHHlWLOYryWXGwgSeKPUh7cwB95RlH+RZZLJAHeaCgVnqyMvcoor4atjd g8ej1z+yjPuH2SLo9xbMo4q3Mqv4aeWlEknncukRtbpHFtLfYoUgRNW553oK33IOByMX umZpv8l4tHO3422O/yshpbr5jSVUy4Hej6VRGaOUGU1LGyov8ah+xcT3t2cBUD7RULbL KvKuq17vgmQu2mcr36Lx+xl89DOEwxF+FcKBcG+ziQG9jGuxFgjv3Q/x7S+perc+zOW3 9jLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=V+DVcx87; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si6932392otp.5.2020.02.24.15.35.37; Mon, 24 Feb 2020 15:36:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=V+DVcx87; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728087AbgBXXe7 (ORCPT + 99 others); Mon, 24 Feb 2020 18:34:59 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:53530 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726651AbgBXXe7 (ORCPT ); Mon, 24 Feb 2020 18:34:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=PY3LO7INDVp+w+EyWwMiX5Boc/JVIKXMjl3FPvBvaMU=; b=V+DVcx87tJk52TKdGhJJCBe/uK inoCeiP5XzzrwO1gSANtRw13Log7drQQvTc2ys8TpcC5zg7m5wXudpHFc8Xdwq2LrHh+5UvyJWN09 ZH51GF2VIzakAVkgfmaK81URA5C9MsOVW8QBhm0XybP/45eZ7IH8KwRWqcHWjww/5McIzpmIwqKb+ twJjGwM9LaCEhOBtH7ryUU8OvzbcQx2CVJRWVA07HWcoGBjZJVFGKq1AHDJ110DowIiCl8GmXEV8q QicSV6dlsuvgePe6A5cVdTcwTit1pJP/gCadj4tyS84frv/bpUzN0EUL3u/g1orpMGqA1qqz4gauH mcy5oHXg==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6NFb-0000go-3n; Mon, 24 Feb 2020 23:34:59 +0000 Date: Mon, 24 Feb 2020 15:34:59 -0800 From: Christoph Hellwig To: Satya Tangirala Cc: Christoph Hellwig , linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org, Barani Muthukumaran , Kuohong Wang , Kim Boojin Subject: Re: [PATCH v7 2/9] block: Inline encryption support for blk-mq Message-ID: <20200224233459.GA30288@infradead.org> References: <20200221115050.238976-1-satyat@google.com> <20200221115050.238976-3-satyat@google.com> <20200221172205.GB438@infradead.org> <20200222005233.GA209268@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200222005233.GA209268@google.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Feb 21, 2020 at 04:52:33PM -0800, Satya Tangirala wrote: > > What is the rationale for this limitation? Restricting unrelated > > features from being used together is a pretty bad design pattern and > > should be avoided where possible. If it can't it needs to be documented > > very clearly. > > > My understanding of blk-integrity is that for writes, blk-integrity > generates some integrity info for a bio and sends it along with the bio, > and the device on the other end verifies that the data it received to > write matches up with the integrity info provided with the bio, and > saves the integrity info along with the data. As for reads, the device > sends the data along with the saved integrity info and blk-integrity > verifies that the data received matches up with the integrity info. Yes, a device supporting inline encryption and integrity will have to update the guard tag to match the encrypted data as well. That alone is a good enough reason to reject the combination for now until it is fully supported. It needs to be properly document, and I think we should also do it at probe time if possible, not when submitting I/O.