Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp11706lql; Sun, 10 Mar 2024 11:11:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfzGsnSMXf0g8KvtAamxlVeK/clshNWO0JwRc6h1SSf9at83PXn/cdFgYpGskGQS/dT8dwRD23hJ+frWCgSjs/tbphim0C6Ou2J/wOJQ== X-Google-Smtp-Source: AGHT+IHhX50Kmyb5WlU+E2jI8UzNY1+JOHLpYKIJnQN7wAaAURf8r1AyBNTkYSOA2XcXwF+bMk9l X-Received: by 2002:a17:90b:8cc:b0:29b:c2b3:2712 with SMTP id ds12-20020a17090b08cc00b0029bc2b32712mr2914170pjb.26.1710094288911; Sun, 10 Mar 2024 11:11:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710094288; cv=pass; d=google.com; s=arc-20160816; b=ZD8drnIpsEQzkGdVLakzZ5g2PimgHg8LzTeIXfF8J0h6JWWfJaQaweZep3a68RY/sj Mdc5ryjdjNSTxVEWo5eQidIjng/aZTSZPKqAncJbkMjBSbqYKtR+y9C6BT8cKJdfvLC6 AprlGhZUzHwviyfUbKAHexUnBnVEehbPbPD+5WdraBd/LVDh8Zcl5w75GKKqieyuziMD R6ZvF/NZzbaRKBbTCx7+IcheCEhJTPLrkzqWOSIu21eJNsO38UB7tqcTzZDtMbO1yVvN pW1IYjdUutvPdCtPZ8yifKFfnA8gstGzTDe1mGHNLWPmOs8atbYpAFH1d8emvg/n6Vqe OHvg== ARC-Message-Signature: i=2; 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=Mqrw6Q+LFP8qXMK/DUxJEU5Q3nQYogfywNL5K+4/HXU=; fh=kgsB+MwhoE+bXHf9zwLNXNFaiz8vm+uLXh+Kme7Slhw=; b=tCMCWjJIEsuRCGpM0ev8J/E7/tZ2vxVLNWF/+P/C2vA1qgpQJ9dAKuIGzXvSm0x3o+ JYwtYZ7/KoOEdzTlA7xLsk4j8oxwr4KY53CsSwSD7TqgB4R321FsEleIvCcjDGnLxzZr ICoRnrH3tv4sp3r/TCAo5diDlIaJKQ8kAK8+FuBU4HUrg/0JCv323OE8RbtTbtfn3Xsh zlIjv9w8O9ma4suVv9e8z4Ovnu0krQ6DnJw+CtVgnwekFvf8fmZ3P/pDi0c2FaeN5hMn 5Xh8IuYEi/khKNk4/KcKdyh5T6RiEoiQSFcLwENWnhp5zo1mhkcnMshiEv/LkAboASOo wAJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YNFvxQSs; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-98286-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jx7-20020a17090b46c700b0029b791853fbsi3511082pjb.112.2024.03.10.11.11.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 11:11:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98286-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YNFvxQSs; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-98286-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98286-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 909A42814DE for ; Sun, 10 Mar 2024 18:11:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5735639FC1; Sun, 10 Mar 2024 18:11:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YNFvxQSs" Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 0BC91383AA; Sun, 10 Mar 2024 18:11:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710094275; cv=none; b=n6QYiflvU4flzeg++rCRxnm4X1P/jQawDYEg01uqj7ret8drTtGoCYRc14NYJkgmzOye65Lb5QbFtzmd7O23Xy1XATkSXh1l9QM8HLuppGzLcz4umq4h1OIH8Ke7295hmJUj1iLN4mjPvP3fow5YNBkYlkOmAJADIPUQs8d10ag= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710094275; c=relaxed/simple; bh=XN1a6+HBLhW5BU/9FsxOQ5YYAtcfzFgEnYY55GqLggs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=P9r9LXXPbao2I65Bu8k49gpyETZ8bkV7J406utojV9dhBGQ2UZZXX0HJ26bXyB/ewlJTMLw1jpDmqYty6bGJfHTIlFm1G9uZDUAN9WIKh7XG9I3C41v+epIJsLFz6ooYq/s09lz3RkLXsz/SWfx4AhIzL7tjFLNq9GKxTRz/j2A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YNFvxQSs; arc=none smtp.client-ip=209.85.208.177 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-f177.google.com with SMTP id 38308e7fff4ca-2d382a78c38so42982031fa.1; Sun, 10 Mar 2024 11:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710094271; x=1710699071; 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=Mqrw6Q+LFP8qXMK/DUxJEU5Q3nQYogfywNL5K+4/HXU=; b=YNFvxQSsbPRAt0LWqYfsVQEFLXWVEQ1L4R4Splt3OoODjxh1+nvMF+S2V54W482ME4 Udb08emty+gsshtqbI/Yz8imibwvB56bGl3h5raBg/EW+0rnGE1caisEY5HS6kC0Rclh l6HFA8PgS+yYTWWbTzSKTC8nq8tJ3L7Zh09tT6VkZpWN0d6VGmJp7EESZZYefzRJZ90Q hXzXtfhlTR8UOa4KV6BExKpAQT/Dteqd1V3UlKGPSNIpaNqiN4Cc5Q4QjnuWelX2S/+g XotjRNelI433LcqpzorAdGhsfPz0b63CMVjgHSeTYDWw+nZ2sCDHCoOoKjt9baWFY2aj yM7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710094271; x=1710699071; 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=Mqrw6Q+LFP8qXMK/DUxJEU5Q3nQYogfywNL5K+4/HXU=; b=hMgHSaryqtlrXeWoeM00wWdSWW68uzqJZKKGFJy0zTiUBg9ZnkM0QohsS/MeBDTGDq 0oUfbA3MN2Hx7XqLZWeDB7FzXqodubuFepXzFsa0wLt465N90uZIm+nGdTRBCrETb2pu Lpo2mvd7mejDTOUCW6QtjpiPQtnla29m/qW8/R7TFtufudKpg2Lmvz8uV0UzGhTL6rJG pWbIpJE1ZnweoX+K4o4ZZv+JBD8AzxseJ9QZSPXZsq5fw+sOZtbNmJjnExdIKrAH47yM gsA2zgWcJxyx1TzJQebRnhF5r6azM2gfzQLOVpYfDAumHXRHt2gCD+rv8NR5Dmxr2d4B cNHg== X-Forwarded-Encrypted: i=1; AJvYcCXVW6UHCAscdCUD5bl5UdkLJsS70ObKsNMXMCeLYGTHNHGx2D9RtAZZ1I5B54Vbm6qdQYV2jBjgaT5Eke/sYYw2NPuk6Rd+PrA8muuuykLoGZ1qo7Zo7IIfF2utOPtntl6Cke0TnYgfEIc= X-Gm-Message-State: AOJu0YxwsvOloj0nYXkWJRzeTIgMh/Umj6KjOY/qEcUSOk1L++sw8wZR BCTtjKBhFE5Lsg+EcVLP0/ueiYnHRvEkCwWkgoaMKuRD2Cm/CabmqgGwVY9CEerHPpYkWCw32QD gtYvC750myRDXNlKLGflK+el/Wrw= X-Received: by 2002:a2e:300b:0:b0:2d3:f866:fdc6 with SMTP id w11-20020a2e300b000000b002d3f866fdc6mr2759565ljw.5.1710094270859; Sun, 10 Mar 2024 11:11:10 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <672e88f2-8ac3-45fe-a2e9-730800017f53@libero.it> In-Reply-To: From: Patrick Plenefisch Date: Sun, 10 Mar 2024 14:11:11 -0400 Message-ID: Subject: Re: LVM-on-LVM: error while submitting device barriers To: Mike Snitzer Cc: Ming Lei , Goffredo Baroncelli , linux-kernel@vger.kernel.org, Alasdair Kergon , Mikulas Patocka , Chris Mason , Josef Bacik , David Sterba , regressions@lists.linux.dev, dm-devel@lists.linux.dev, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Mar 10, 2024 at 11:27=E2=80=AFAM Mike Snitzer = wrote: > > On Sun, Mar 10 2024 at 7:34P -0400, > Ming Lei wrote: > > > On Sat, Mar 09, 2024 at 03:39:02PM -0500, Patrick Plenefisch wrote: > > > On Wed, Mar 6, 2024 at 11:00=E2=80=AFAM Ming Lei wrote: > > > > > > > > #!/usr/bin/bpftrace > > > > > > > > #ifndef BPFTRACE_HAVE_BTF > > > > #include > > > > #endif > > > > > > > > kprobe:submit_bio_noacct, > > > > kprobe:submit_bio > > > > / (((struct bio *)arg0)->bi_opf & (1 << __REQ_PREFLUSH)) !=3D 0 / > > > > { > > > > $bio =3D (struct bio *)arg0; > > > > @submit_stack[arg0] =3D kstack; > > > > @tracked[arg0] =3D 1; > > > > } > > > > > > > > kprobe:bio_endio > > > > /@tracked[arg0] !=3D 0/ > > > > { > > > > $bio =3D (struct bio *)arg0; > > > > > > > > if (($bio->bi_flags & (1 << BIO_CHAIN)) && $bio->__bi_remai= ning.counter > 1) { > > > > return; > > > > } > > > > > > > > if ($bio->bi_status !=3D 0) { > > > > printf("dev %s bio failed %d, submitter %s completi= on %s\n", > > > > $bio->bi_bdev->bd_disk->disk_name, > > > > $bio->bi_status, @submit_stack[arg0], kstac= k); > > > > } > > > > delete(@submit_stack[arg0]); > > > > delete(@tracked[arg0]); > > > > } > > > > > > > > END { > > > > clear(@submit_stack); > > > > clear(@tracked); > > > > } > > > > > > > > > > Attaching 4 probes... > > > dev dm-77 bio failed 10, submitter > > > submit_bio_noacct+5 > > > __send_duplicate_bios+358 > > > __send_empty_flush+179 > > > dm_submit_bio+857 > > > __submit_bio+132 > > > submit_bio_noacct_nocheck+345 > > > write_all_supers+1718 > > > btrfs_commit_transaction+2342 > > > transaction_kthread+345 > > > kthread+229 > > > ret_from_fork+49 > > > ret_from_fork_asm+27 > > > completion > > > bio_endio+5 > > > dm_submit_bio+955 > > > __submit_bio+132 > > > submit_bio_noacct_nocheck+345 > > > write_all_supers+1718 > > > btrfs_commit_transaction+2342 > > > transaction_kthread+345 > > > kthread+229 > > > ret_from_fork+49 > > > ret_from_fork_asm+27 > > > > > > dev dm-86 bio failed 10, submitter > > > submit_bio_noacct+5 > > > write_all_supers+1718 > > > btrfs_commit_transaction+2342 > > > transaction_kthread+345 > > > kthread+229 > > > ret_from_fork+49 > > > ret_from_fork_asm+27 > > > completion > > > bio_endio+5 > > > clone_endio+295 > > > clone_endio+295 > > > process_one_work+369 > > > worker_thread+635 > > > kthread+229 > > > ret_from_fork+49 > > > ret_from_fork_asm+27 > > > > > > > > > For context, dm-86 is /dev/lvm/brokenDisk and dm-77 is /dev/lowerVG/l= vmPool > > > > io_status is 10(BLK_STS_IOERR), which is produced in submission code pa= th on > > /dev/dm-77(/dev/lowerVG/lvmPool) first, so looks it is one device mappe= r issue. > > > > The error should be from the following code only: > > > > static void __map_bio(struct bio *clone) > > > > ... > > if (r =3D=3D DM_MAPIO_KILL) > > dm_io_dec_pending(io, BLK_STS_IOERR); > > else > > dm_io_dec_pending(io, BLK_STS_DM_REQUEUE); > > break; > > I agree that the above bpf stack traces for dm-77 indicate that > dm_submit_bio failed, which would end up in the above branch if the > target's ->map() returned DM_MAPIO_KILL or DM_MAPIO_REQUEUE. > > But such an early failure speaks to the flush bio never being > submitted to the underlying storage. No? > > dm-raid.c:raid_map does return DM_MAPIO_REQUEUE with: > > /* > * If we're reshaping to add disk(s)), ti->len and > * mddev->array_sectors will differ during the process > * (ti->len > mddev->array_sectors), so we have to requeue > * bios with addresses > mddev->array_sectors here or > * there will occur accesses past EOD of the component > * data images thus erroring the raid set. > */ > if (unlikely(bio_end_sector(bio) > mddev->array_sectors)) > return DM_MAPIO_REQUEUE; > > But a flush doesn't have an end_sector (it'd be 0 afaik).. so it seems > weird relative to a flush. > > > Patrick, you mentioned lvmPool is raid1, can you explain how lvmPool is > > built? It is dm-raid1 target or over plain raid1 device which is > > build over /dev/lowerVG? LVM raid1: lvcreate --type raid1 -m 1 ... I had previously added raidintegrity and caching like "lowerVG/single", but I had removed them in trying to root cause this bug > > In my earlier reply I asked Patrick for both: > lsblk > dmsetup table Oops, here they are, trimmed for relevance: NAME sdb =E2=94=94=E2=94=80sdb2 =E2=94=9C=E2=94=80lowerVG-single_corig_rmeta_1 =E2=94=82 =E2=94=94=E2=94=80lowerVG-single_corig =E2=94=82 =E2=94=94=E2=94=80lowerVG-single =E2=94=9C=E2=94=80lowerVG-single_corig_rimage_1_imeta =E2=94=82 =E2=94=94=E2=94=80lowerVG-single_corig_rimage_1 =E2=94=82 =E2=94=94=E2=94=80lowerVG-single_corig =E2=94=82 =E2=94=94=E2=94=80lowerVG-single =E2=94=9C=E2=94=80lowerVG-single_corig_rimage_1_iorig =E2=94=82 =E2=94=94=E2=94=80lowerVG-single_corig_rimage_1 =E2=94=82 =E2=94=94=E2=94=80lowerVG-single_corig =E2=94=82 =E2=94=94=E2=94=80lowerVG-single =E2=94=9C=E2=94=80lowerVG-lvmPool_rmeta_0 =E2=94=82 =E2=94=94=E2=94=80lowerVG-lvmPool =E2=94=82 =E2=94=9C=E2=94=80lvm-a =E2=94=82 =E2=94=94=E2=94=80lvm-brokenDisk =E2=94=9C=E2=94=80lowerVG-lvmPool_rimage_0 =E2=94=82 =E2=94=94=E2=94=80lowerVG-lvmPool =E2=94=82 =E2=94=9C=E2=94=80lvm-a =E2=94=82 =E2=94=94=E2=94=80lvm-brokenDisk sdc =E2=94=94=E2=94=80sdc3 =E2=94=9C=E2=94=80lowerVG-single_corig_rmeta_0 =E2=94=82 =E2=94=94=E2=94=80lowerVG-single_corig =E2=94=82 =E2=94=94=E2=94=80lowerVG-single =E2=94=9C=E2=94=80lowerVG-single_corig_rimage_0_imeta =E2=94=82 =E2=94=94=E2=94=80lowerVG-single_corig_rimage_0 =E2=94=82 =E2=94=94=E2=94=80lowerVG-single_corig =E2=94=82 =E2=94=94=E2=94=80lowerVG-single =E2=94=9C=E2=94=80lowerVG-single_corig_rimage_0_iorig =E2=94=82 =E2=94=94=E2=94=80lowerVG-single_corig_rimage_0 =E2=94=82 =E2=94=94=E2=94=80lowerVG-single_corig =E2=94=82 =E2=94=94=E2=94=80lowerVG-single sdd =E2=94=94=E2=94=80sdd3 =E2=94=9C=E2=94=80lowerVG-lvmPool_rmeta_1 =E2=94=82 =E2=94=94=E2=94=80lowerVG-lvmPool =E2=94=82 =E2=94=9C=E2=94=80lvm-a =E2=94=82 =E2=94=94=E2=94=80lvm-brokenDisk =E2=94=94=E2=94=80lowerVG-lvmPool_rimage_1 =E2=94=94=E2=94=80lowerVG-lvmPool =E2=94=9C=E2=94=80lvm-a =E2=94=94=E2=94=80lvm-brokenDisk sdf =E2=94=9C=E2=94=80sdf2 =E2=94=82 =E2=94=9C=E2=94=80lowerVG-lvmPool_rimage_1 =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80lowerVG-lvmPool =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80lvm-a =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80lvm-brokenDisk lowerVG-single: 0 5583462400 cache 254:32 254:31 254:71 128 2 metadata2 writethrough mq 0 lowerVG-singleCache_cvol: 0 104857600 linear 259:13 104859648 lowerVG-singleCache_cvol-cdata: 0 104775680 linear 254:30 81920 lowerVG-singleCache_cvol-cmeta: 0 81920 linear 254:30 0 lowerVG-single_corig: 0 5583462400 raid raid1 3 0 region_size 4096 2 254:33 254:36 254:67 254:70 lowerVG-single_corig_rimage_0: 0 5583462400 integrity 254:35 0 4 J 8 meta_device:254:34 recalculate journal_sectors:130944 interleave_sectors:1 buffer_sectors:128 journal_watermark:50 commit_time:10000 internal_hash:crc32c lowerVG-single_corig_rimage_0_imeta: 0 44802048 linear 8:35 5152466944 lowerVG-single_corig_rimage_0_iorig: 0 4724465664 linear 8:35 427821056 lowerVG-single_corig_rimage_0_iorig: 4724465664 431005696 linear 8:35 53620= 01920 lowerVG-single_corig_rimage_0_iorig: 5155471360 427819008 linear 8:35 2048 lowerVG-single_corig_rimage_0_iorig: 5583290368 172032 linear 8:35 51522949= 12 lowerVG-single_corig_rimage_1: 0 5583462400 integrity 254:69 0 4 J 8 meta_device:254:68 recalculate journal_sectors:130944 interleave_sectors:1 buffer_sectors:128 journal_watermark:50 commit_time:10000 internal_hash:crc32c lowerVG-single_corig_rimage_1_imeta: 0 44802048 linear 8:18 5583472640 lowerVG-single_corig_rimage_1_iorig: 0 5583462400 linear 8:18 10240 lowerVG-single_corig_rmeta_0: 0 8192 linear 8:35 5152286720 lowerVG-single_corig_rmeta_1: 0 8192 linear 8:18 2048 lowerVG-lvmPool: 0 6442450944 raid raid1 3 0 region_size 4096 2 254:73 254:74 254:75 254:76 lowerVG-lvmPool_rimage_0: 0 2967117824 linear 8:18 5628282880 lowerVG-lvmPool_rimage_0: 2967117824 59875328 linear 8:18 12070733824 lowerVG-lvmPool_rimage_0: 3026993152 3415457792 linear 8:18 8655276032 lowerVG-lvmPool_rimage_1: 0 2862260224 linear 8:51 10240 lowerVG-lvmPool_rimage_1: 2862260224 164732928 linear 8:82 3415459840 lowerVG-lvmPool_rimage_1: 3026993152 3415457792 linear 8:82 2048 lowerVG-lvmPool_rmeta_0: 0 8192 linear 8:18 5628274688 lowerVG-lvmPool_rmeta_1: 0 8192 linear 8:51 2048 lvm-a: 0 1468006400 linear 254:77 1310722048 lvm-brokenDisk: 0 1310720000 linear 254:77 2048 lvm-brokenDisk: 1310720000 83886080 linear 254:77 2778728448 lvm-brokenDisk: 1394606080 2015404032 linear 254:77 4427040768 lvm-brokenDisk: 3410010112 884957184 linear 254:77 2883586048 As a side note, is there a way to make lsblk only show things the first time they come up? > > Picking over the described IO stacks provided earlier (or Goffredo's > interpretation of it, via ascii art) isn't really a great way to see > the IO stacks that are in use/question. > > > Mike, the logic in the following code doesn't change from v5.18-rc2 to > > v5.19, but I still can't understand why STS_IOERR is set in > > dm_io_complete() in case of BLK_STS_DM_REQUEUE && !__noflush_suspending= (), > > since DMF_NOFLUSH_SUSPENDING is only set in __dm_suspend() which > > is supposed to not happen in Patrick's case. > > > > dm_io_complete() > > ... > > if (io->status =3D=3D BLK_STS_DM_REQUEUE) { > > unsigned long flags; > > /* > > * Target requested pushing back the I/O. > > */ > > spin_lock_irqsave(&md->deferred_lock, flags); > > if (__noflush_suspending(md) && > > !WARN_ON_ONCE(dm_is_zone_write(md, bio))) { > > /* NOTE early return due to BLK_STS_DM_REQUEUE be= low */ > > bio_list_add_head(&md->deferred, bio); > > } else { > > /* > > * noflush suspend was interrupted or this is > > * a write to a zoned target. > > */ > > io->status =3D BLK_STS_IOERR; > > } > > spin_unlock_irqrestore(&md->deferred_lock, flags); > > } > > Given the reason from dm-raid.c:raid_map returning DM_MAPIO_REQUEUE > I think the DM device could be suspending without flush. > > But regardless, given you logged BLK_STS_IOERR lets assume it isn't, > the assumption that "noflush suspend was interrupted" seems like a > stale comment -- especially given that target's like dm-raid are now > using DM_MAPIO_REQUEUE without concern for the historic tight-coupling > of noflush suspend (which was always the case for the biggest historic > reason for this code: dm-multipath, see commit 2e93ccc1933d0 from > 2006 -- predates my time with developing DM). > > So all said, this code seems flawed for dm-raid (and possibly other > targets that return DM_MAPIO_REQUEUE). I'll look closer this week. > > Mike