Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp817010pxf; Thu, 25 Mar 2021 14:55:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+o0hFcsWDsvBMfwGZoc6FXfBGk5AHMh8hO1/D0exyjSVWAMN1lxypv0x7592vezjyKR7l X-Received: by 2002:a17:907:119b:: with SMTP id uz27mr11688855ejb.464.1616709309200; Thu, 25 Mar 2021 14:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616709309; cv=none; d=google.com; s=arc-20160816; b=0b4uYVPQsJmh/VK7xwUain5PcO5rJUsvEtxfwOEmh5C/1Lr3LnfWwXTE6mjb47Oahs tpihLLlWB+5A4YNhSmO1g3bEpb0f4L5CzXUHNtyAoZ+oc4v4pHlf9e7eFuuhRRzU5SI3 68xVzUm8DpmONzVlbXzjgE5cuxa+v9X9CIIxYK+Px3VZpQdVfeoawDU5VyS2TLKy/3RK lV7Z332lH1nZ7b79zVSIfButyUsmw66S2jyJeFNc4YzGMEgUzS8gaCfuHZAYFMI9fy6p 3syOfLfn0X4GK6XnIisW3LX/0inDiTZjb6XfBk7+ey8F6BF/zCOTslocS/1gpQrF6l91 sDfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=1zlx7U8zMxFMkzfA5vorsSxNONk+fwIqBOsm+WJihPg=; b=eXqVyufQEfyiTk3FYIkhmQ8JQb66Nr5ysU+PGoLJOP7P/v04eR/HLY2Rr2YM3HRozY nMKCMePXgSqR2Dk7pbZ/Jx0mfafATmeKb9Eg1rIkC8gqHBJVz4Iwbb+UZRbtDhyvmsO+ mGLtswSPoaAqJjyscvKWNCRcsVqLyMAuu8MkU10J5L8wbqK4LOBsYbkk81bYi6HfchMW SIzM643j7SkRwefS0QRUutBxm7pLj2E0gyeG3ZHFinHRI72PaSMGiUSEEuOBAlYriz2N gBYxdVOuEOss1Dd+A0GFO3x09I7WXyqq3C31rLFGfuashbUV2oybDQxlAieAZRzaUKDz y6Fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 b9si5244159edq.492.2021.03.25.14.54.45; Thu, 25 Mar 2021 14:55:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231213AbhCYVvs (ORCPT + 99 others); Thu, 25 Mar 2021 17:51:48 -0400 Received: from mail-pj1-f49.google.com ([209.85.216.49]:41584 "EHLO mail-pj1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbhCYVve (ORCPT ); Thu, 25 Mar 2021 17:51:34 -0400 Received: by mail-pj1-f49.google.com with SMTP id nh23-20020a17090b3657b02900c0d5e235a8so1521678pjb.0; Thu, 25 Mar 2021 14:51:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1zlx7U8zMxFMkzfA5vorsSxNONk+fwIqBOsm+WJihPg=; b=K2p7OaLNES7ysHOV9EiD1OySRUBom5Qnq4S625kSHdBZbOB2BT8MTkznZrAcHe3dmq H6Gs/NKdC7WFSUo5FlPryIw705We8BvG8w38lkumnqs05c4GFPHx1a/q7D6DfgJUK6Vv Yq7SVYM1UYsH5a7xYH2DV5dNSC4Chmt+C7jyB6jTNsVb4nsV1OSe7JBtQ9/5+17OGwEE 9R1Djcpg88uAxTnvBp2tEF2tNgwpq2nrstHiBgvAZ2u7dN7YIQ1Q4En4h76Vtdks/xnU cPgzFp/6sWarIUaUJTkKHTHdywnS9wnaxzW+euQcewOK1uyOd9v6GLWb68Y15/wL1V1z FXHQ== X-Gm-Message-State: AOAM530nhIWGYmuPU5qnsq8QQSAzWIgPY/OCL0oPE+ITjafZXI0pJoPC 7Mr6IpG8KKoOGUOfvoWTjW8= X-Received: by 2002:a17:90a:3809:: with SMTP id w9mr10481793pjb.79.1616709093981; Thu, 25 Mar 2021 14:51:33 -0700 (PDT) Received: from ?IPv6:2601:647:4000:d7:c5af:7b7c:edac:ee67? ([2601:647:4000:d7:c5af:7b7c:edac:ee67]) by smtp.gmail.com with ESMTPSA id z25sm6685401pfn.37.2021.03.25.14.51.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Mar 2021 14:51:33 -0700 (PDT) Subject: Re: [PATCH v2 0/8] ensure bios aren't split in middle of crypto data unit To: Satya Tangirala , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jens Axboe , Eric Biggers References: <20210325212609.492188-1-satyat@google.com> From: Bart Van Assche Message-ID: Date: Thu, 25 Mar 2021 14:51:31 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210325212609.492188-1-satyat@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/25/21 2:26 PM, Satya Tangirala wrote: > When a bio has an encryption context, its size must be aligned to its > crypto data unit size. A bio must not be split in the middle of a data > unit. Currently, bios are split at logical block boundaries [...] Hi Satya, Are you sure that the block layer core splits bios at logical block boundaries? Commit 9cc5169cd478 ("block: Improve physical block alignment of split bios") should have changed the behavior from splitting at logical block boundaries into splitting at physical block boundaries. Without having looked at this patch series, can the same effect be achieved by reporting the crypto data unit size as the physical block size? Thanks, Bart.