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: 8487931 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E1CC3C0554 for ; Thu, 3 Mar 2016 05:21:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E72A20270 for ; Thu, 3 Mar 2016 05:21:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 43228202AE for ; Thu, 3 Mar 2016 05:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751846AbcCCFU6 (ORCPT ); Thu, 3 Mar 2016 00:20:58 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:32985 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751690AbcCCFUx (ORCPT ); Thu, 3 Mar 2016 00:20:53 -0500 Received: by mail-pa0-f42.google.com with SMTP id fl4so7975006pad.0 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=Rlob6WgtrGT0//Mlz6XUFDhmdnpPh6JzNtKVHqvbVScA/O/bNPuHXX6/nixJJnKgtg LQlXKDg4E6ah6X2wwfdVaEXCTXScaKgKwwGTcdrOFXDjuOJLvKBId/O5TBYMpzT7RK+F XL6nq6M9DBhw/ci8H3U+KcAVeVCxHY233bTFnr39/ODT5AiNJ7/8+a8ygJn8AGrwZqWv pNJo1sIztr1oFcz2xh+u8BrPGWQKroQyyYw82cA0F9FJwXHM9pnbc/zDDV/tPJWQJEnw vkfKFj6+bbexzxonjol+OG7uIyjY77HwjZuKegPyZUS4s1bZBs+MclIdGKPDsSfEQj2S y1eQ== X-Gm-Message-State: AD7BkJKAY8QWABoqUPizaEd55FWVx95Wm+BEUqD+yIPlBzBm+IHQYk3IAzPi3n7BaO64leWn 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-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);