From patchwork Tue Mar 15 07:48:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 8585791 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6542D9F758 for ; Tue, 15 Mar 2016 07:49:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 970AF201B9 for ; Tue, 15 Mar 2016 07:49:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9776820295 for ; Tue, 15 Mar 2016 07:49:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964836AbcCOHtI (ORCPT ); Tue, 15 Mar 2016 03:49:08 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:33096 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964794AbcCOHs5 (ORCPT ); Tue, 15 Mar 2016 03:48:57 -0400 Received: by mail-pf0-f181.google.com with SMTP id 124so18013778pfg.0 for ; Tue, 15 Mar 2016 00:48:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=YV266U1gCBgBvhDT/nRe7lI/vsxjhH6nq+MA4rYE1lU=; b=it8bNl6iYKzgDGLNy5u9dYF6IDf1DDekltFbqTQyroljw+axlIyVa9la2f8Gy5IUFk 7Ig1hFtyryxgyipYeeeWN14Pk0eUodfbwdfboPYL9TcRcjWLzFArv6EbPICHMfvdjQLL lgHynuX11Zl26YSETLyNeBVcz6pUVchreKkwc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=YV266U1gCBgBvhDT/nRe7lI/vsxjhH6nq+MA4rYE1lU=; b=OUf0ONpxUfCy24T7mqjf6ud85W+lDFj45CCDkK7Ogp25qtc8LPf4z3+KG1aRMyLA3B m/UWK08LC/WowhKlOJ55sbje9g8eoVu6rSQXvfUBF7DbCZsWjOc3laUKiqc0ynIJN5WJ d5gpiLbEbkT74W8f4CvmpSHfe6sAtL1gIohGHLCOgT/JWY3OITMlqDl/gAm9jda8Fvyy kHtLlfJmzA4pI2ClhMyJ7WvP7qnqhVwNymJS5OQCxWDksBQlpwB1Y9X0iTsSYkUxIoFg 0nTugBaViyfGmeG/tLutc3R/Ihtm9Z+eWmPJjiOpq4l89rbYvWXg/lSzTDentcYz+KhU bBWw== X-Gm-Message-State: AD7BkJJWr+PTKOBRM4mQ437zd6/JJ4fODpFNSulY9d56nwEuliZMHDewRidHV4taM8A2cTHL X-Received: by 10.98.66.90 with SMTP id p87mr36318226pfa.78.1458028135655; Tue, 15 Mar 2016 00:48:55 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id 23sm37215530pfs.34.2016.03.15.00.48.50 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Mar 2016 00:48:55 -0700 (PDT) From: Baolin Wang To: herbert@gondor.apana.org.au, davem@davemloft.net, agk@redhat.com, snitzer@redhat.com, axboe@fb.com, dm-devel@redhat.com Cc: akpm@linux-foundation.org, david.s.gordon@intel.com, thomas.lendacky@amd.com, robert.jarzmik@free.fr, yamada.masahiro@socionext.com, smueller@chronox.de, tadeusz.struk@intel.com, standby24x7@gmail.com, shli@kernel.org, broonie@kernel.org, linus.walleij@linaro.org, arnd@arndb.de, baolin.wang@linaro.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-raid@vger.kernel.org Subject: [PATCH v2 4/4] md: dm-crypt: Initialize the sector number for one request Date: Tue, 15 Mar 2016 15:48:02 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the crypto engine can support the bulk mode, that means the contiguous requests from one block can be merged into one request to be handled by crypto engine. If so, the crypto engine need the sector number of one request to do merging action. Signed-off-by: Baolin Wang --- drivers/md/dm-crypt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 3147c8d..9e2dbfd 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -866,6 +866,7 @@ static int crypt_convert_block(struct crypt_config *cc, return r; } + req->sector = ctx->cc_sector; ablkcipher_request_set_crypt(req, &dmreq->sg_in, &dmreq->sg_out, 1 << SECTOR_SHIFT, iv);