Received: by 2002:a05:7412:361b:b0:f9:2edb:3e4d with SMTP id ie27csp113535rdb; Sun, 17 Dec 2023 17:30:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHILgeUoKVxIwvnmWXmjYbr3YJfGn45QDsqN2xzYdZaothlN4byz11pOARed7KfCztwf4Nr X-Received: by 2002:a17:906:55:b0:a1b:7700:2c0b with SMTP id 21-20020a170906005500b00a1b77002c0bmr16930417ejg.19.1702863002160; Sun, 17 Dec 2023 17:30:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702863002; cv=none; d=google.com; s=arc-20160816; b=J8ezfeM2j5JnpDqUyhXiBcKx3EMpViBHbrfjbVDUMBjkEr5Xe5qru+AxgG+vGnF13f 44LYNRMXRNNr6grCDM7awm94K31UUAjVJxdB19QVTh66frHl7CJiFti3sVUf4zi0aILX xNFbvjBtilXMR/XgNSIXy9I7TnptJ121kZZpUo0xsx29JZVVhlT5Var4JupatIb90Sif TyfU1BUpzCu2wR+pf5Gw7nizgYIbcRwFcn4BcZIe6IMY7ZXT5VShiE+QL0yL9HQO4yHd NNgnEno2IsbsAWrBEnzMSSgj0wxC8w6ddf5OnZ4WUeaZ6QZfvs+f70w7PEEhkL3o7+Dx 1nYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=fRWJvmM8+hpVsGJoyvu2YuvVcQVJUfQcuTmMveSE8/s=; fh=uTXg1G6mpdGKL5+htXHdqKBMniUfw1k4O5urgOKzmKU=; b=tUmErEZ6WUwdJVrBLoAqO0kVuHuIrQtc7JnQjdHLiBnPgqkgsC3I9T2XWh4khZkY/4 tdswpbMqxoFgn6+szJ0zvq/t7uv1eqPpntSgTC+rSaN7WJAK7YwPAjoP3cK/0pajGCq5 mzCVrGB3fOv4Fr9HVqQzuIq+ygsq10LzkKfqSQ9Gk6B3cLGMBuLS6abWWYjkFsy5LflN 76/e9xRe9G1G0vN80vKHBq+/AGpjA/hcQpzWqVL/aqz6MYTZpGW/+47KoIYEKEcv7bqG FGib5TN5fBERZ9F2xi31STMh4P1eaFRa6VFN8Q86yyY/SiozIj2s8rinq3mMkAqOnCB3 kdxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dPhYYv0K; spf=pass (google.com: domain of linux-kernel+bounces-2909-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2909-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fx24-20020a170906b75800b00a2330958787si1359733ejb.757.2023.12.17.17.30.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 17:30:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2909-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dPhYYv0K; spf=pass (google.com: domain of linux-kernel+bounces-2909-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2909-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E39241F21CB1 for ; Mon, 18 Dec 2023 01:30:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1D9F11CB7; Mon, 18 Dec 2023 01:29:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dPhYYv0K" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D114C11711; Mon, 18 Dec 2023 01:29:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6d9d209c9bbso2267609a34.0; Sun, 17 Dec 2023 17:29:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702862949; x=1703467749; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fRWJvmM8+hpVsGJoyvu2YuvVcQVJUfQcuTmMveSE8/s=; b=dPhYYv0K+27O1UaiUwzTK1fRfCZrX4n1IJf6uQgEDIhw8lLixBrAnlWzVG14MXIz5O eUKy4pm/k4uAd33tlYqm38JiNmS6e+uNBJUa7t+Su+EvzJ9yz3g+iwgjrROiCYmFEdw6 xWfr8EL01JiNQYxjIpYogoym0yvtbe0xJsyVNkSQelTo6NyX0k/W2ub10Idz66JpJPuw EMlAV7nwACqI8lobxphyQl/HInWnVKO+UsS95bM4EKkZSBnlPAY9J7jpGETc9HyvE4Wq HrXNkK7C67amznPotHAYt3Jtty7yQED3kzWpku7P/IY1G0wHWRVw3vYYPM2qEnyyuhWi eYTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702862949; x=1703467749; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fRWJvmM8+hpVsGJoyvu2YuvVcQVJUfQcuTmMveSE8/s=; b=hxD7P/ZIEmCB7jBeIrrWB3mGi0w9irjk2XND0BCnA5TKVi92AfKwO+eQ7aXZgJlg22 HRxYFh1/WCEPccYdAEOyF7Fk/3bqUpD4Gx70OXPmNg3e0Zvv7kW3srtIh4gIMY64vuQ3 8Zk91waKLXGwBas/cKGCCPN+IuIELebw+l1EE8lpsohQJkGw/EVROAfW7/3EnCk872Sb vJroO0DQ4G82JMHejfkItTNZ2GUI9EWJuGEf42PtTOAe7LqlhSPzATcnNc1Drytshqxv 9lBIvQ50R8Hgmt3bhxWaPe01QWIrxovAb/DFTldhlzRlR8cXfOT3toeJFAgfqDwGGgVP olEQ== X-Gm-Message-State: AOJu0YzKmJoTqBz93nBaq5c0TEWAPBFSiyBrwxX1ZPDCF/qhG1xhTU8p Y1CzvI/FT+7XElNB127eFhs= X-Received: by 2002:a9d:638a:0:b0:6d9:d44d:cf1e with SMTP id w10-20020a9d638a000000b006d9d44dcf1emr17069720otk.13.1702862948962; Sun, 17 Dec 2023 17:29:08 -0800 (PST) Received: from ubuntu.. ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id s6-20020a625e06000000b006d64c4cb661sm1414014pfb.200.2023.12.17.17.29.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 17:29:08 -0800 (PST) From: Hongyu Jin To: agk@redhat.com, snitzer@kernel.org, mpatocka@redhat.com, axboe@kernel.dk, ebiggers@kernel.org Cc: zhiguo.niu@unisoc.com, ke.wang@unisoc.com, yibin.ding@unisoc.com, hongyu.jin@unisoc.com, linux-kernel@vger.kernel.org, dm-devel@lists.linux.dev, linux-block@vger.kernel.org Subject: [PATCH v5 RESEND 5/5] dm-crypt: Fix lost ioprio when queuing write bios Date: Mon, 18 Dec 2023 09:27:46 +0800 Message-Id: <20231218012746.24442-6-hongyu.jin.cn@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218012746.24442-1-hongyu.jin.cn@gmail.com> References: <20231218012746.24442-1-hongyu.jin.cn@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Hongyu Jin The original submitting bio->bi_ioprio setting can be retained by struct dm_crypt_io::base_bio, we set the original bio's ioprio to the cloned bio for write. Link: https://lore.kernel.org/dm-devel/alpine.LRH.2.11.1612141049250.13402@mail.ewheeler.net Signed-off-by: Hongyu Jin --- 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 6de107aff331..7149da6555b8 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1683,6 +1683,7 @@ static struct bio *crypt_alloc_buffer(struct dm_crypt_io *io, unsigned int size) GFP_NOIO, &cc->bs); clone->bi_private = io; clone->bi_end_io = crypt_endio; + clone->bi_ioprio = io->base_bio->bi_ioprio; remaining_size = size; -- 2.34.1