From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64446C433EF for ; Thu, 10 Feb 2022 22:38:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345031AbiBJWiw (ORCPT ); Thu, 10 Feb 2022 17:38:52 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345026AbiBJWiv (ORCPT ); Thu, 10 Feb 2022 17:38:51 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2932D2664 for ; Thu, 10 Feb 2022 14:38:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644532731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=QSJblWqLgyZmlZxEVd+22+iLGNHpkwCdE5Y4iGn/nKk=; b=B75ltYWfx6YwdcMKvPiBLipoM4wJYMkJ9i9xcRjzBaUOtes2kh9BwRgFgpImH4tU/8Q9jV hdrFrD19U4zQ3f8UiJcirIPjhrprwB4hOwOi4biDLRTgb7GTe8eTtvNyok3DnZBvzflU/J mLoeQ2ASwPjAPC9bfj30PYT7sIThxY8= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-155--OMCaOwqPy29gx78bCWKuw-1; Thu, 10 Feb 2022 17:38:50 -0500 X-MC-Unique: -OMCaOwqPy29gx78bCWKuw-1 Received: by mail-qt1-f197.google.com with SMTP id d25-20020ac84e39000000b002d1cf849207so5513244qtw.19 for ; Thu, 10 Feb 2022 14:38:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QSJblWqLgyZmlZxEVd+22+iLGNHpkwCdE5Y4iGn/nKk=; b=rUBhUKdsCRcnt9kzfDGGqrEuPqo5gHQFR8Th3ofC2zFQZdtfFMYPuGLOXEUhOmVV+R IW7Lwi/nV4f9v5sWXrsriiiXyltgoWLmyyjHXfHEftFmjE+/tAVAPKFFgETC+p9JfjSy HkVXjKa+PMue1E0nM7VMei8/L6M1r0SXcEoMBakePJLPbZUNTTUrM9+z1lQywCAuoWTr NVEHWR1m/ov/kzKxVYx66pEb2GfqGnEbjjU1O+QxoHyZRGjMZJSSigA1p4/EnrepfuEm 4dKsb7Q6aVOkg3Pe7w+QKft9snOC8G0+xQovVn+6O+H1OC5PBSHSCY1zB+3TCgwO3Z6k grwg== X-Gm-Message-State: AOAM531ovQV2Z2rxYZGuFIrOmZJln+iexgnsTGWTvX2sWcLoSsyuTK66 QYRIfp0hr5MZPP3WHfsEEC79mYPx2PzSgrVfKIhTrNwzxx07iH8wI0KmAEf3oYk0xXb7Wydbcac TkLWibT5cEHRkTqSGqJGacQ== X-Received: by 2002:a05:622a:411:: with SMTP id n17mr6496115qtx.466.1644532729490; Thu, 10 Feb 2022 14:38:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzT+PtvXuOy9fF5SaJVeCa3zFUy2819JDuwEm2PCy3GAfUwDOgDHA08+EaJap4V4vdpA0o8KQ== X-Received: by 2002:a05:622a:411:: with SMTP id n17mr6496110qtx.466.1644532729298; Thu, 10 Feb 2022 14:38:49 -0800 (PST) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id j11sm11447294qtx.67.2022.02.10.14.38.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 14:38:48 -0800 (PST) From: Mike Snitzer To: dm-devel@redhat.com Cc: linux-block@vger.kernel.org Subject: [PATCH 11/14] dm crypt: use dm_submit_bio_remap Date: Thu, 10 Feb 2022 17:38:29 -0500 Message-Id: <20220210223832.99412-12-snitzer@redhat.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20220210223832.99412-1-snitzer@redhat.com> References: <20220210223832.99412-1-snitzer@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Signed-off-by: Mike Snitzer --- drivers/md/dm-crypt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index a5006cb6ee8a..9ea197de08c2 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1855,7 +1855,7 @@ static int kcryptd_io_read(struct dm_crypt_io *io, gfp_t gfp) return 1; } - submit_bio_noacct(clone); + dm_submit_bio_remap(io->base_bio, clone); return 0; } @@ -1881,7 +1881,7 @@ static void kcryptd_io_write(struct dm_crypt_io *io) { struct bio *clone = io->ctx.bio_out; - submit_bio_noacct(clone); + dm_submit_bio_remap(io->base_bio, clone); } #define crypt_io_from_node(node) rb_entry((node), struct dm_crypt_io, rb_node) @@ -1960,7 +1960,7 @@ static void kcryptd_crypt_write_io_submit(struct dm_crypt_io *io, int async) if ((likely(!async) && test_bit(DM_CRYPT_NO_OFFLOAD, &cc->flags)) || test_bit(DM_CRYPT_NO_WRITE_WORKQUEUE, &cc->flags)) { - submit_bio_noacct(clone); + dm_submit_bio_remap(io->base_bio, clone); return; } @@ -3363,6 +3363,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) ti->num_flush_bios = 1; ti->limit_swap_bios = true; + ti->accounts_remapped_io = true; dm_audit_log_ctr(DM_MSG_PREFIX, ti, 1); return 0; -- 2.15.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02635C433FE for ; Thu, 10 Feb 2022 22:42:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644532969; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eyDnQBeg85TFQfxTIKFLqxOg5BlkLOx0OEjR8otTYI8=; b=aKyf7KimnkVItmyIV7TeWlVjVajFTD/yJfhVQxLuZoWLC0DMbRvryqzBvfhcwNt5N0XrZ0 nNTxbr7Tcv1CkpbxQEHlGOeaiPoAmIWYpHeNxSB6hOLUQ0MTSXcfLpA01oLgqehDL2f3a7 wAWIieMrelJD7w+IyLcA6WgEJBtUjdY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-256-oF5MIT9sM3OP1KNYna1o-A-1; Thu, 10 Feb 2022 17:42:46 -0500 X-MC-Unique: oF5MIT9sM3OP1KNYna1o-A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 35B2864145; Thu, 10 Feb 2022 22:42:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C2784696D; Thu, 10 Feb 2022 22:42:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EA5014A7CA; Thu, 10 Feb 2022 22:42:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21AMcp3b014845 for ; Thu, 10 Feb 2022 17:38:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 70875492D51; Thu, 10 Feb 2022 22:38:51 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6CEEB492D47 for ; Thu, 10 Feb 2022 22:38:51 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 593051C05157 for ; Thu, 10 Feb 2022 22:38:51 +0000 (UTC) Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-638-MaI3DOEKNriyyZI7Wq8RWg-1; Thu, 10 Feb 2022 17:38:50 -0500 X-MC-Unique: MaI3DOEKNriyyZI7Wq8RWg-1 Received: by mail-qk1-f200.google.com with SMTP id d11-20020a37680b000000b0047d87e46f4aso4556697qkc.11 for ; Thu, 10 Feb 2022 14:38:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QSJblWqLgyZmlZxEVd+22+iLGNHpkwCdE5Y4iGn/nKk=; b=KCKTCWLEXnQMuARY/mKovKvjGafbAJZ1xhzPwReQuChihovGHhM3GCbsO9qUoADGY9 hkCCEH+FzuhZkEjTdICGnjHtXoCT9gNlU/Q/2kYRjxBJ22LdshGxgi14Se6jSMLRJrr3 IpoWRKYPyNkUQEi2CvRd0jF6nmeGxbxlZ5dQW1qt+5aPLIuNhVmjRTJ0VD8qND5sM8ZN 8tFijYKv7Icxi/5BeWDuvSR7x7zpYfF1T9HNEMsuQqHWImEFj7jML/9oa3e9JU6hN1k0 QMm4qgG44DXltuYUqStM/5/jXcgPgdfV2aAZD4gSwzrCBOuawV5I4JQ4S968jCYx70CV qoGw== X-Gm-Message-State: AOAM530JTbShADMwL8wXhzN4wuiy/umzbVtk5TYXzntZnQ1Vwsw6PSDj MY3FiQpDktIZ4wtbRpOEHUzGxUbTxIMF34OcowPGZQMc3HqpsBW/970TioI0R8QlVm24hF4qBAw eJs1wX0WLYnnRuA7Yba0Lr/Cko9YO00FMDjTwDRROn5WZzD82fr4zpu1CJjCWBP96LA== X-Received: by 2002:a05:622a:411:: with SMTP id n17mr6496120qtx.466.1644532729551; Thu, 10 Feb 2022 14:38:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzT+PtvXuOy9fF5SaJVeCa3zFUy2819JDuwEm2PCy3GAfUwDOgDHA08+EaJap4V4vdpA0o8KQ== X-Received: by 2002:a05:622a:411:: with SMTP id n17mr6496110qtx.466.1644532729298; Thu, 10 Feb 2022 14:38:49 -0800 (PST) Received: from localhost (pool-68-160-176-52.bstnma.fios.verizon.net. [68.160.176.52]) by smtp.gmail.com with ESMTPSA id j11sm11447294qtx.67.2022.02.10.14.38.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 14:38:48 -0800 (PST) From: Mike Snitzer To: dm-devel@redhat.com Date: Thu, 10 Feb 2022 17:38:29 -0500 Message-Id: <20220210223832.99412-12-snitzer@redhat.com> In-Reply-To: <20220210223832.99412-1-snitzer@redhat.com> References: <20220210223832.99412-1-snitzer@redhat.com> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-loop: dm-devel@redhat.com Cc: linux-block@vger.kernel.org Subject: [dm-devel] [PATCH 11/14] dm crypt: use dm_submit_bio_remap X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Signed-off-by: Mike Snitzer --- drivers/md/dm-crypt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index a5006cb6ee8a..9ea197de08c2 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1855,7 +1855,7 @@ static int kcryptd_io_read(struct dm_crypt_io *io, gfp_t gfp) return 1; } - submit_bio_noacct(clone); + dm_submit_bio_remap(io->base_bio, clone); return 0; } @@ -1881,7 +1881,7 @@ static void kcryptd_io_write(struct dm_crypt_io *io) { struct bio *clone = io->ctx.bio_out; - submit_bio_noacct(clone); + dm_submit_bio_remap(io->base_bio, clone); } #define crypt_io_from_node(node) rb_entry((node), struct dm_crypt_io, rb_node) @@ -1960,7 +1960,7 @@ static void kcryptd_crypt_write_io_submit(struct dm_crypt_io *io, int async) if ((likely(!async) && test_bit(DM_CRYPT_NO_OFFLOAD, &cc->flags)) || test_bit(DM_CRYPT_NO_WRITE_WORKQUEUE, &cc->flags)) { - submit_bio_noacct(clone); + dm_submit_bio_remap(io->base_bio, clone); return; } @@ -3363,6 +3363,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) ti->num_flush_bios = 1; ti->limit_swap_bios = true; + ti->accounts_remapped_io = true; dm_audit_log_ctr(DM_MSG_PREFIX, ti, 1); return 0; -- 2.15.0 -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel