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: 63861 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp502290lbc; Tue, 15 Mar 2016 00:49:27 -0700 (PDT) X-Received: by 10.66.246.165 with SMTP id xx5mr44408504pac.87.1458028167276; Tue, 15 Mar 2016 00:49:27 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zi6si255340pac.32.2016.03.15.00.49.27 for ; Tue, 15 Mar 2016 00:49:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org 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 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(+) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);