From patchwork Thu Mar 3 05:19:39 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: 63435 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2755205lbc; Wed, 2 Mar 2016 21:21:12 -0800 (PST) X-Received: by 10.98.64.4 with SMTP id n4mr1085524pfa.58.1456982471225; Wed, 02 Mar 2016 21:21:11 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 67si21478741pft.56.2016.03.02.21.21.10; Wed, 02 Mar 2016 21:21:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753383AbcCCFVA (ORCPT + 30 others); Thu, 3 Mar 2016 00:21:00 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:36815 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751687AbcCCFUx (ORCPT ); Thu, 3 Mar 2016 00:20:53 -0500 Received: by mail-pa0-f43.google.com with SMTP id fi3so6103986pac.3 for ; Wed, 02 Mar 2016 21:20:53 -0800 (PST) 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=OkKkz/1OVmql+CBOGtQdyy6i10cSEPGsThnEhXDQoKQ4Ep4eQcOYECDO21e23DHaCC zMnIsyTbBqT7aTud6CG3UcWoYyf7IaZJtHyU40Scs12Kjq8s4n7cQjIxqmfpt89xYQpH KiBMXQ7iq3+gPeYfDtN8W3S5kCJ8kGdozmkFY= 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=VBaRftIijzhwAiYZEtuAnBdjp6caczQjqj+hDGuAx2oRX0ZKP4uOSqz7hnFqU9U2rk D2+0c9N4FA2MvTBugkVt6eNnJf41U6QQ1baey0DnvJWaW3evAgiXb4LbZ/jmfn6/bApt uuIC65HvIvxDjaQKSjulgEd3+kL9TCmmxZd45HMZimVr1MATC0/E0+5UqrZJDPWtNc4E PBpMFkfMdT5DWp1tnCbOE5Q1LiBav4XLg2hgneSQXo8N/KTa/lRcGZWhSvDkRO9AZmPf S8sNF/Ax8d4fUVxiyxqFJYvpY3n9sQGShJMLfPUDpFwILgrNJxFucwSdJNsDOoE0N4r4 5d6w== X-Gm-Message-State: AD7BkJLUXaThCcdjcMBK4T1sJqKc1gB4b5nN/dXHNKAXVjreMm7BOtJJJDUc/LDxRFsDs+if X-Received: by 10.67.8.100 with SMTP id dj4mr1076259pad.88.1456982452907; Wed, 02 Mar 2016 21:20:52 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id 82sm9656456pfi.78.2016.03.02.21.20.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Mar 2016 21:20:52 -0800 (PST) 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 4/4] md: dm-crypt: Initialize the sector number for one request Date: Thu, 3 Mar 2016 13:19:39 +0800 Message-Id: <7c56c594c2398b4d5740d733d7e98d6586217819.1456981315.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 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);