Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp280628rdb; Tue, 19 Dec 2023 17:15:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUECUkYbVNq2+1YZbqx70k6Bm4tjvnYamjAeDBAVoRl9SVoLFtEXtpV97ZerMEIa/pJjfE X-Received: by 2002:a50:d755:0:b0:553:82de:b01 with SMTP id i21-20020a50d755000000b0055382de0b01mr1508499edj.22.1703034927399; Tue, 19 Dec 2023 17:15:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703034927; cv=none; d=google.com; s=arc-20160816; b=lHao03SiyhXcukmh0GoFC7m4YSbbEejg2mh/nmodcPY+cgBGOlvDgJTdJjfeQIbIzS X2S2hhqK3f7W1qKkzab8dIAz+1BWecMCpHtbud4M50Or0YTZFHHX//SRbuY+a2PxIXfg JR2ieZTBQ4chc5mfK0NfeH0GbNAga+su0LaDkYKqIo/zJBVYzcaBPTMb52sZ551FdrlV YuQJh5atqFbCcoQWgGC+pX7wh5YcfnqgvbBe3j0Gf1E06Xxk4mT+HoPBAdfaE7dySgwY uWlZPzh9kfXfreB9GllctTJdmtdjWUgrK/43UwlCRQk01Z5tlarGEcbSCSVJCKk4+8L6 57ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=eTHm0I4P2zQ/TFgdn8ZGMyjYnErvDS5xEoA7hWb25I0=; fh=yb92nzQoOsvy6Npn4FLYnMluflezXl70Xk+W7SfQOl0=; b=RT/iyEpU3wrzbRMxtaLgJLMUq6+z6LP4NWaAEVO17tgkj9c6+JJQMTqZs0fzxBX734 re0DfA0xEJugcjrBmLi5evZ+mV+iyhacdx9naXQknBDylOMujcZvQEB/nI/E0apGER6J 3qLSp/z1O/kPwxqhPblMok5mgpNP0VlM8oYTVkzRCVJOHcRB72DHdMAhn0L5PrAaLgkg 73odY2z9/EGBA0AeEsxuFVG291LSFcBAo5I6Qdx9MJAGPA2LUKySNw9YkwtSSfGeeNXe 4jnSLOt5eiC0doErB9y3/5LgZaXMAYQ06/O8lMR7bg8vUfzfAWuJWCzx0tq3H7DMih2j P4fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AKp8Or+n; spf=pass (google.com: domain of linux-kernel+bounces-6224-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6224-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u19-20020a50a413000000b00553521ddb16si2124660edb.380.2023.12.19.17.15.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 17:15:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6224-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AKp8Or+n; spf=pass (google.com: domain of linux-kernel+bounces-6224-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6224-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 2A5171F24D72 for ; Wed, 20 Dec 2023 01:15:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8BA11101CC; Wed, 20 Dec 2023 01:15:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AKp8Or+n" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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 26F25E547; Wed, 20 Dec 2023 01:15:08 +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-lj1-f169.google.com with SMTP id 38308e7fff4ca-2cc7d2c1ff0so21580741fa.3; Tue, 19 Dec 2023 17:15:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703034907; x=1703639707; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=eTHm0I4P2zQ/TFgdn8ZGMyjYnErvDS5xEoA7hWb25I0=; b=AKp8Or+nEvLY1ZCPsE9BUF+lMW054iLsYMsGD2tSirN0ZGD6crRlQkEZRtW2vpAerF rUiBIm0ovlWbiJuruOFonoAVeJyNOIFpyGGjCFpWvK5Sq1jDaoHDSiJA2G1tKCtn0Fyq hX2M8aGlc6vcCIKbnTu3EZnKnuyF+emf3zIXXJa6YqWYiNQ2KlFwjAZpj3Kh5oZmyoGF 7bTSc1BEEHA4KQvHtByXhk6nMx7AM5LT+pqLx4/e9aXuDpzNgLVM6Jqn6rKNUd47ZE6N QeResZQQRysnC1SigH4QZoaRhkX5bv55V/oOs+2yGVyyX/G/aET6/6P8nD44pnyEc1h9 KG1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703034907; x=1703639707; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eTHm0I4P2zQ/TFgdn8ZGMyjYnErvDS5xEoA7hWb25I0=; b=HMY941rz658pOjQftrDtCSKfyUTXRW/PGaUrcQcnK9v65bQdcspiNuU3UnJ6Oa435c dIcvoipDNaWbtSmOQwpDni534bvSzaKC9xcUSlyU2eC2MGbczRhuDHX+XniubIoBsOzT tWQS65vTo3Flc9dxINodnPH3AoAFoIRWFlZ1jRtmwV8Yub62qr501dr27fgJh2x06XkE +nZX67GAM6HDzqAeTZ1FdxyrILiCwj64FQXHyYZwjUSeZTYsxpgVjcK+9S+MYfscn1So L6gMKw2+Yf9tva4BXZED30iKy06mAyn8slj5RH6O2Sdm3hlu7z5gBvdf0HS8ESFjdcTH dFMg== X-Gm-Message-State: AOJu0YyaBW8u5zvM1gzT8x1ymvwF5b3TLLxSvf7InkWWk73Vz8lQr8KK /gI3GY81Z55juIUTuaw1OGjogoguU5/U2lktOI4= X-Received: by 2002:a2e:b054:0:b0:2cc:56a9:32d7 with SMTP id d20-20020a2eb054000000b002cc56a932d7mr3631186ljl.85.1703034906688; Tue, 19 Dec 2023 17:15:06 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231218012746.24442-1-hongyu.jin.cn@gmail.com> <20231218012746.24442-5-hongyu.jin.cn@gmail.com> <20231219224821.GC38652@quark.localdomain> In-Reply-To: <20231219224821.GC38652@quark.localdomain> From: Hongyu Jin Date: Wed, 20 Dec 2023 09:14:56 +0800 Message-ID: Subject: Re: [PATCH v5 RESEND 4/5] dm verity: Fix I/O priority lost when read FEC and hash To: Eric Biggers Cc: agk@redhat.com, snitzer@kernel.org, mpatocka@redhat.com, axboe@kernel.dk, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Eric Biggers =E4=BA=8E2023=E5=B9=B412=E6=9C=8820=E6= =97=A5=E5=91=A8=E4=B8=89 06:48=E5=86=99=E9=81=93=EF=BC=9A > > On Mon, Dec 18, 2023 at 09:27:45AM +0800, Hongyu Jin wrote: > > From: Hongyu Jin > > > > To fix this problem, when read FEC and hash from disk, I/O priority are > > inconsistent with data block and blocked by other I/O with low I/O > > priority. > > > > Make I/O for FEC and hash has same I/O priority with original data I/O. > > "To fix this problem" is supposed to be in the second paragraph, not the = first, > right? Yes, The verification and error correction process takes effect after obtaining the data. > > > @@ -728,6 +730,7 @@ static void verity_submit_prefetch(struct dm_verity= *v, struct dm_verity_io *io) > > sector_t block =3D io->block; > > unsigned int n_blocks =3D io->n_blocks; > > struct dm_verity_prefetch_work *pw; > > + struct bio *bio =3D dm_bio_from_per_bio_data(io, v->ti->per_io_da= ta_size); > > > > if (v->validated_blocks) { > > while (n_blocks && test_bit(block, v->validated_blocks)) = { > > The caller has the bio pointer already, so maybe just add it as a paramet= er to > verity_submit_prefetch()? > > - Eric ok, I will change it.