Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp569672lqs; Tue, 5 Mar 2024 09:45:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVc7hy2IACux8hinPPRcUpCK3KuBttMo1Xl/lFQjVl4OnUC74vAWasDCV07Lg6tqp3dGKn9KS4YfXK7ZkU0r6v9IuE+lP5LoYv/E7NmOg== X-Google-Smtp-Source: AGHT+IFKPJiTe4fmzedCmeJ0hd7YiZJVsRJRhzfw4vGqSdc5eqPBPLCr6iUd6emUvHZ2ncO+fIZx X-Received: by 2002:a50:cc46:0:b0:565:862d:1c58 with SMTP id n6-20020a50cc46000000b00565862d1c58mr8697867edi.8.1709660732210; Tue, 05 Mar 2024 09:45:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709660732; cv=pass; d=google.com; s=arc-20160816; b=J/ONM2tY1IlI+E5sKyRn2wqlzC3Y7/k/ZMjfADVDgoaqfArP04PUShGC/D4yzCkWHv p8GUxeK2Dobl9nVrUbeaj9fjunKNGZyVdBGDH2bB9X6uW/SRW8YSFMzEoc27BUyE7uJE WgZ+eLtOquP6XEv+jV6ndHAX1ydTHI+lg9lS3a/27g0eG/Wo4EBqfOvOkpj7dK9aNaBA VJF80oHPVPJwqP9hu0ocx8mUQpdmX+hXBjNGRIdDFK13KYNXkFZJTI6T5tZjTBMW+xVW PElgfMFRUb3TGadzzUHYQpVeCkRDQ6cKEMzkWfrZaoDZ4yhGfqGBtkjcpquLwS+PQpQA Weag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=gge8MXN2cBaJhAIuFm/jj/2ek2UAvG5SbyWzw+LqrLU=; fh=ngNGJsfhLkmFSvSsUwTx4vYmTlYkmkpznztbo1l8kzk=; b=DUilEwzwfklJmy2xDsmtvtT9TvDSoAOZ+pnaWB4ELWlg2Xfzih41AGn5fHkkzG5Bye kHBfX569oJm+1oA5PhhBxudoMLSPfayru2kh/bl0ssgJBAK5FOavZTk7vK3HwDBXYrq8 D7tki/HOLRu1O3+BSWKHjhLF09kc8BLOvGPgNVKOwtV9ZZSQvA4cBDZP9mcXs9Vlq30U +tDLHVbZQQ7GFDt9KEY1HzrtXSa2GfgsUbFtOfQLnPlyyIDERSeeIjf/7EB1PLj7RFbo YdbtM1DOF0APVhNd8mIaHrwxLeM8Ycz90NO1oM2pqi1lMn5sqVCCc4IAQjyhmlufacno JGMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-92778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92778-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s13-20020a50d48d000000b0056755b89d00si1912793edi.466.2024.03.05.09.45.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 09:45:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92778-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; arc=pass (i=1 spf=pass spfdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-92778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92778-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 BA9F71F22389 for ; Tue, 5 Mar 2024 17:45:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4626A17730; Tue, 5 Mar 2024 17:45:18 +0000 (UTC) Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) (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 ABE2917565 for ; Tue, 5 Mar 2024 17:45:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660717; cv=none; b=a+jL8RWA0wfwqLgJlxX5LZwOTNBAcxekcWXqoAFjoOfVRhel3iExiaXfKkrwfgP3ndGftEpxaEENfPGxY1Vwod6n99mjqcbXcjkwgHB1UYd22leqi5UvblFp0iLHVTOEhTN/8NjOx2WfkPguLSXVHD8JxskEVabPkyrzwyEc5PU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660717; c=relaxed/simple; bh=IsePTlOOrrY+PtgSBJ/oAdEDQA2yIEUijGkssqsdR4o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Qx7zk0JPUo3Gy0IWXVPj5TGTzmJFO5yHp8Ny709zADMjz79pZbNt/8Ce/5nQwHu2GHnvk7Gx/g/WD6iWTSzJRRj0Re8q3xuKcNNiVG3eo0tUpP2DQgHsJyt6P2kWh7n+ZJu/MkrzziMy3hSmE/5XuAOVg/Pylfi1/zpf0HluXxc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=redhat.com; arc=none smtp.client-ip=209.85.219.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Received: by mail-qv1-f44.google.com with SMTP id 6a1803df08f44-6908b5037d5so3119876d6.3 for ; Tue, 05 Mar 2024 09:45:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709660715; x=1710265515; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gge8MXN2cBaJhAIuFm/jj/2ek2UAvG5SbyWzw+LqrLU=; b=qnEp4a9D2UrmsW6kGaxSHHVxhQagBkPNboNuWzH8Gjfc0P+BOrfSpoiU8AKbCZx0v2 QsY0w6F8AM5BvMQrckFbgy59pU7I/f6bxGO0eoO+iNimbqwpWJByLRLRMF0xpd9kZ1lB Jzsv/u1q1TnO20Uzbl4XtwTOCMCTL6lqf42Ql/eGHE2FZLxBOanr8+AGGDMinj3UfJTw xib3CMYfR26xtLGdLtM9rkLzo5tjN2jDaOCZiOV5cjtVw4DQq9OaLRPpbRkj1jlCjvid +tFFa2QNlbA/Msc+xKhWEYxgSCJbpjwJi4gDkVt7eY7lXj0k3FCJZsA7dY3gVav+URVL Hkvw== X-Forwarded-Encrypted: i=1; AJvYcCVYGvlSuVxx+8x7609q7S683RgavRboopVcEGpjI6AMbMvaSSlvLZLaUeABd+OXFfwimZSEkFq+i9ujMUln7ln0jY868h29nxo+UP8K X-Gm-Message-State: AOJu0Yw+7KeT/QN3osGXARl7a0pjapKlqgWJzbhuB+N3l47LnP3JzCm1 TmohEa7IFXozEiBT2wvdCVTAIc5Js/rRvd+awJEM7m1pxjzOniQncOnnCrkRTA== X-Received: by 2002:ad4:4045:0:b0:690:7770:e6d4 with SMTP id r5-20020ad44045000000b006907770e6d4mr3044733qvp.34.1709660714673; Tue, 05 Mar 2024 09:45:14 -0800 (PST) Received: from localhost (pool-68-160-141-91.bstnma.fios.verizon.net. [68.160.141.91]) by smtp.gmail.com with ESMTPSA id ny4-20020a056214398400b0068fe4669e71sm6425247qvb.91.2024.03.05.09.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 09:45:14 -0800 (PST) Date: Tue, 5 Mar 2024 12:45:13 -0500 From: Mike Snitzer To: Patrick Plenefisch Cc: 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, ming.lei@redhat.com Subject: Re: LVM-on-LVM: error while submitting device barriers Message-ID: References: <672e88f2-8ac3-45fe-a2e9-730800017f53@libero.it> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 PM 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 actual > > > > extents, lowerVG/single spans (3TB+3TB), and > > > > lowerVG/lvmPool/lvm/brokenDisk spans (3TB+1.5TB). Both obviously have > > > > the other leg of raid1 on the 8TB drive, but my thought was that 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 missed before: > > > BTRFS error (device dm-75): bdev /dev/mapper/lvm-brokenDisk errs: wr > > 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=-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. Hi Patrick, Your initial report (start of this thread) mentioned that the regression occured with 5.19. The DM changes that landed during the 5.19 merge window refactored quite a bit of DM core's handling for bio splitting (to simplify DM's newfound support for bio polling) -- Ming Lei (now cc'd) and I wrote these changes: e86f2b005a51 dm: simplify basic targets bdb34759a0db dm: use bio_sectors in dm_aceept_partial_bio b992b40dfcc1 dm: don't pass bio to __dm_start_io_acct and dm_end_io_acct e6926ad0c988 dm: pass dm_io instance to dm_io_acct directly d3de6d12694d dm: switch to bdev based IO accounting interfaces 7dd76d1feec7 dm: improve bio splitting and associated IO accounting 2e803cd99ba8 dm: don't grab target io reference in dm_zone_map_bio 0f14d60a023c dm: improve dm_io reference counting ec211631ae24 dm: put all polled dm_io instances into a single list 9d20653fe84e dm: simplify bio-based IO accounting further 4edadf6dcb54 dm: improve abnormal bio processing I'll have a closer look at these DM commits (especially relative to flush bios and your stacked device usage). The last commit (4edadf6dcb54) is marginally relevant (but likely most easily reverted from v5.19-rc2, as a simple test to see if it somehow a problem... doubtful to be cause but worth a try). (FYI, not relevant because it is specific to REQ_NOWAIT but figured I'd mention it, this commit earlier in the 5.19 DM changes was bogus: 563a225c9fd2 dm: introduce dm_{get,put}_live_table_bio called from dm_submit_bio Jens fixed it with this stable@ commit: a9ce385344f9 dm: don't attempt to queue IO under RCU protection) > > > However yes, I agree that the pair of disks involved may be the answer > > > of the problem. > > > > > > Could you show us the output of > > > > > > $ sudo pvdisplay -m > > > > > > > > > > I trimmed it, but kept the relevant bits (Free PE is thus not correct): > > > > > > --- Physical volume --- > > PV Name /dev/lowerVG/lvmPool > > VG Name lvm > > PV Size <3.00 TiB / not usable 3.00 MiB > > Allocatable yes > > PE Size 4.00 MiB > > Total PE 786431 > > Free PE 82943 > > Allocated PE 703488 > > PV UUID 7p3LSU-EAHd-xUg0-r9vT-Gzkf-tYFV-mvlU1M > > > > --- Physical Segments --- > > Physical extent 0 to 159999: > > Logical volume /dev/lvm/brokenDisk > > Logical extents 0 to 159999 > > Physical extent 160000 to 339199: > > Logical volume /dev/lvm/a > > Logical extents 0 to 179199 > > Physical extent 339200 to 349439: > > Logical volume /dev/lvm/brokenDisk > > Logical extents 160000 to 170239 > > Physical extent 349440 to 351999: > > FREE > > Physical extent 352000 to 460026: > > Logical volume /dev/lvm/brokenDisk > > Logical extents 416261 to 524287 > > Physical extent 460027 to 540409: > > FREE > > Physical extent 540410 to 786430: > > Logical volume /dev/lvm/brokenDisk > > Logical extents 170240 to 416260 Please provide the following from guest that activates /dev/lvm/brokenDisk: lsblk dmsetup table Please also provide the same from the host (just for completeness). 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? Mike