Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp339308lqk; Sat, 9 Mar 2024 12:39:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUjcX60/A6QVI49BggWSL6yUED1nlSQZ6x8uD6UAXiFU9hZ6O/FCpA6NBq9c75CWm8W7EC1+liw7o8H1XcBa5kAna642XWDsfDfvVXwmA== X-Google-Smtp-Source: AGHT+IGDXnNvWqtmJtGarulNl3b7K2CtDhzx0OP2269Byy5NK5ZHwxoT4qbRHmSnAIPFJOYdISbK X-Received: by 2002:a05:620a:2456:b0:788:6712:e216 with SMTP id h22-20020a05620a245600b007886712e216mr315345qkn.74.1710016759186; Sat, 09 Mar 2024 12:39:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1710016759; cv=pass; d=google.com; s=arc-20160816; b=dHSpi+oUkJqMzbWjRRBU9GHIoRr3Hkz93d/xZsXf7hAxzo2XAA1tv7Spy1KqsNaAXC l6s/nGW4yUyMnuCITg7/+7cWHK3W7f9kIbLRKxKjKcfLPQoaeG0mMtTweOMKd6BwsdWR QKVPXYI4+XjgKxC+PKDWLdVGOaH+97Wz2jV/9C3Gyt3dwQyxhn4cPPcfZBKm0OQ7V1Ug WizYJuo26MWSfwVrrjS9ha1Y67qXzRIynjERG5eIpmkmWukKATM5XjA2ugDPpIpbfrL+ zhqZoAJn/iAvq5gDSJdzRpO9dy291//FN9BxoXzmwfjWAstGykPeVcCRbVrh6g/7LZl8 6KLA== 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=JDiTA26ys4mFafvA8yF6JgwyplvVYoLA/SIyv4h4Hm8=; fh=xFsF9oZnoPXZDOF3XKtUJykIfZFzZuhdF7yMdn08wJM=; b=VIcQFxKTNPNMblAUZfP9zGwc7ftOhw0ZEq4XNM3c3OBsCJ2MWCsQDDMouMztcwoC5t SnCZOMVhUkwCtKqD/pKqzDzPyh6fOgfYzzMo7OzOBtNoQ1IH81iiCP66fr7fnG43zYt8 OW/4IZqcWIWFxs3m5QlLH29/g3GyOnAbR9RPtCtNDltVHhjmCqLr7h+eCRtz9e4NoV2Y 2Uz9Cq67yZ1IZpQmL3Xmi6WqZw5QuYBM9qwN+89in6rVfB5txJ7h2UmdtYVcGjzKqzCe +d5U49YNS8GIZSF58GnkFIno8EK6d7Txd6sxnS0p4f2zb5+AbrxqqeKDrMuTLctLGvA9 j67w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gt5Wr7UU; 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-98034-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98034-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bk30-20020a05620a1a1e00b007882e4e5330si2415851qkb.267.2024.03.09.12.39.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 12:39:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98034-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gt5Wr7UU; 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-98034-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98034-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D61371C20B04 for ; Sat, 9 Mar 2024 20:39:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 217794F888; Sat, 9 Mar 2024 20:39:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gt5Wr7UU" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 5108837169; Sat, 9 Mar 2024 20:39:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710016745; cv=none; b=OJm0PS6/ZVvzCbcnxm9l8rJo6JCOqkBwXgYT/RkK3N/YjNUSWNvIpGNnQVejOyVDyMP/gYkAHA5+H2NDtWTeKk1uzsiioX58mF2R52nV/mz6Qgt4TtK1MWOBLgBZEiF0ugQpWj9ngT6RDSi58RFD4MjpDwsmDZ35fslopt34Kx4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710016745; c=relaxed/simple; bh=08Kf6wLUralnLwdcMzfktgfwRNCnuyqHwA/xZ33ICdU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=GehoxrjvXB3xRIIMxV8ZgolEjjtstYsWqm1u9ePyqrvtbeWgHsg/UMyZVoF6lJiV5BkQDQtXaGcP6FPT3Q6oPJTMaAwhN8UOdZ0l04NVRP9k1yhEe88LBOp3VWl6ircGyjbpTJ/6giSlFFwDr2SWJjnCAO4d3M3T+QPM+0lXsy0= 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=gt5Wr7UU; arc=none smtp.client-ip=209.85.208.175 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-f175.google.com with SMTP id 38308e7fff4ca-2d269b2ff48so49453141fa.3; Sat, 09 Mar 2024 12:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710016741; x=1710621541; 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=JDiTA26ys4mFafvA8yF6JgwyplvVYoLA/SIyv4h4Hm8=; b=gt5Wr7UUxtRMhBBW4QtwhN+5pu0rcGxXwcpRI6m0AA0+/aSPx/kat28NmjCO9DRW6O 5UIf5I+4Gk69YYVxApBOLKP5EVe/2ffk8w2B+v6ZHQSC711eX5cn0mGb1rRcZ7QM3l41 eVFwaxRseIsQHLjYjGD+wFTIh8FZY8twT7+epGWExaBPPuYZHhpUAxVsbvKSCUkSZqgq kX7KAArGtcC9PHLAEIEZn6B7h2av7ZHUuB5HgzoP+i3Q6fjvNabCSTP0TOKn2wx8U1lt bpmMIDfF/7dvmpDGnVDiIs82X9RI5VQQ81oU9Ln73YKKvtcLgEpOTH2+cIk3iyYFNSDA Q7Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710016741; x=1710621541; 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=JDiTA26ys4mFafvA8yF6JgwyplvVYoLA/SIyv4h4Hm8=; b=dQ1L9BZLXE8StCuBZQuYcR7A3iAsHLiAjINRQOB57bPrdIVqdGcFg3PMEfclK21y+o RLgAwnVbSXGG5nzjJrRe3SmiZO+15r1BWhcegWBQKNxteusrMLIO46NsF8o0I+CG5g9x 4rj7fgZjfVsGpn3SetuDce3QGb/HoNgGuK/r43+JmOUA3zw6m5IeMcamnGOyofYl2QnH k1ulVtEDrOgkC6GJVvdSr7SGNQp+So/y2QOHj6sgi4TgrqsRUF4Zp7qC3fUte3PKdpQb NEMZCT37t9KUZ+meIsJDeYCJ+0qNdIROn+4Mi59o4lB7mSS0C6U220ED4hOC1cGBppOF kUHg== X-Forwarded-Encrypted: i=1; AJvYcCXcWLoXEXQWlZ8cWF5sy++NdCwYW+VOTyvnb5098U+xGnb/nYlB645klfl02rj6U/nmWcDjDzYwgOtuMQGi3b2P5ppjeANHDgHcs6CJTTyYaJrnTW7XdpbefNI7XHmmHTQtu5UEhUfioPM= X-Gm-Message-State: AOJu0Yw/LMIXrXbYNkXgNKIPXadS9k/pRC291IgDCjLV5d09iXVIgNEu ZqGDLnaib3UZnVf1Tro6arIlczH8BQy6FEFnImpdHpeeMiROK3aeC+B26o6CAhp/9KtkNuiRkZz SX4PGgaLUvK74tdhymh05Cl7omoY= X-Received: by 2002:a2e:8ec5:0:b0:2d4:21d6:b05e with SMTP id e5-20020a2e8ec5000000b002d421d6b05emr1605477ljl.52.1710016741237; Sat, 09 Mar 2024 12:39:01 -0800 (PST) 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: Sat, 9 Mar 2024 15:39:02 -0500 Message-ID: Subject: Re: LVM-on-LVM: error while submitting device barriers To: Ming Lei Cc: Mike Snitzer , 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 Wed, Mar 6, 2024 at 11:00=E2=80=AFAM Ming Lei wrot= e: > > On Tue, Mar 05, 2024 at 12:45:13PM -0500, Mike Snitzer wrote: > > On Thu, Feb 29 2024 at 5:05P -0500, > > Goffredo Baroncelli wrote: > > > > > On 29/02/2024 21.22, Patrick Plenefisch wrote: > > > > On Thu, Feb 29, 2024 at 2:56=E2=80=AFPM Goffredo Baroncelli wrote: > > > > > > > > > > > Your understanding is correct. The only thing that comes to my = mind to > > > > > > cause the problem is asymmetry of the SATA devices. I have one = 8TB > > > > > > device, plus a 1.5TB, 3TB, and 3TB drives. Doing math on the ac= tual > > > > > > extents, lowerVG/single spans (3TB+3TB), and > > > > > > lowerVG/lvmPool/lvm/brokenDisk spans (3TB+1.5TB). Both obviousl= y have > > > > > > the other leg of raid1 on the 8TB drive, but my thought was tha= t the > > > > > > jump across the 1.5+3TB drive gap was at least "interesting" > > > > > > > > > > > > > > > what about lowerVG/works ? > > > > > > > > > > > > > That one is only on two disks, it doesn't span any gaps > > > > > > Sorry, but re-reading the original email I found something that I mis= sed before: > > > > > > > BTRFS error (device dm-75): bdev /dev/mapper/lvm-brokenDisk errs: w= r > > > > 0, rd 0, flush 1, corrupt 0, gen 0 > > > > BTRFS warning (device dm-75): chunk 13631488 missing 1 devices, max > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > tolerance is 0 for writable mount > > > > BTRFS: error (device dm-75) in write_all_supers:4379: errno=3D-5 IO > > > > failure (errors while submitting device barriers.) > > > > > > Looking at the code, it seems that if a FLUSH commands fails, btrfs > > > considers that the disk is missing. The it cannot mount RW the device= . > > > > > > I would investigate with the LVM developers, if it properly passes > > > the flush/barrier command through all the layers, when we have an > > > lvm over lvm (raid1). The fact that the lvm is a raid1, is important = because > > > a flush command to be honored has to be honored by all the > > > devices involved. > > Hello Patrick & Goffredo, > > I can trigger this kind of btrfs complaint by simulating one FLUSH failur= e. > > If you can reproduce this issue easily, please collect log by the > following bpftrace script, which may show where the flush failure is, > and maybe it can help to narrow down the issue in the whole stack. > > > #!/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_remaining.c= ounter > 1) { > return; > } > > if ($bio->bi_status !=3D 0) { > printf("dev %s bio failed %d, submitter %s completion %s\= n", > $bio->bi_bdev->bd_disk->disk_name, > $bio->bi_status, @submit_stack[arg0], kstack); > } > 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/lvmPool > > > Thanks, > Ming > And to answer Mike's question: > > Also, I didn't see any kernel logs that show DM-specific errors. I > doubt you'd have left any DM-specific errors out in your report. So > is btrfs the canary here? To be clear: You're only seeing btrfs > errors in the kernel log? Correct, that's why I initially thought it was a btrfs issue. No DM errors in dmesg, btrfs is just the canary