Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 804132D97BC for ; Tue, 7 Oct 2025 11:27:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759836469; cv=none; b=uOn/jY55cIV/BdoWSYJT29fw8mbN3JhJB2gsZHmuOGqWm2nxwhzkdVpLu2V1yscC+OGEAfqisYgTnIwVD5NQR8N3C2Pmmxq4lLgQ60wu5lh3V5W4uZGTOSx0nkD/TrDGd54KXi+L2aytv78cMbvMrAjy63vVBpX/+sQx1QAh8tY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759836469; c=relaxed/simple; bh=wqJDEKVLzUu+bmE8T0CknAlItSCHQK3tCurqt/NOTvA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VSxwbS7r7bqRTr4Cwwk0nhk0Xugk+aiWDzdeLgLNum7DWVaOcxLtn6bRR/lvZhuweB+QYnIlUsgWZGxHqI892zsuz93V0v9EaUm1hW8D9AqO/YO6wpre9IStqxXTIj21MQvxSOhtipnMj03lKEZh5a2RdRNPYVXzFp8eaOM6COk= 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=apXHoL6A; arc=none smtp.client-ip=209.85.214.178 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="apXHoL6A" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-279e2554b6fso40486075ad.2 for ; Tue, 07 Oct 2025 04:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759836466; x=1760441266; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yifwvUfd6EQg5oEIHcFKDrABwZnWbH+QRIqrQ5iFLao=; b=apXHoL6Ahl0Qs1Nd0sG2k85jlItPBMgp6ThysTRfqHLSST6AffzXTNSGoMesJ8tD6O KsRCntWLpFu3sgI7kpUoMcgOk4TzmV/SgfRivUQ/MxSOxDM+C2M3H46OGT+vvrOR/Ks1 5p/9QB0lzZtj20d20h1ymH8lwfhg3FClKrisx8bIn+crrd2oEUu59SBMAGQVg8kCFvMv Z+IJGfo7eBvD/1PvVWpP+SudCWDgBzNY+a/KxVL0yLHaGKTf3DxGuuveYIw133/6c60R apqJrFU5QLd96MOl9KxDaO9VKJrFlY2qoiJSCGUV4zSV/UYaKg2DGe/RoMjDpVkcaznC me/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759836466; x=1760441266; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yifwvUfd6EQg5oEIHcFKDrABwZnWbH+QRIqrQ5iFLao=; b=ZgoDJU+2yHIec0TObIzTSzmCCMsoC88eMKZKobeWb4M2UgkHENUKQuTfYevA6ZvIT8 sMBV4zCP/hGP9SvW3ZzXg7VmAXr5XOOkP04GKyVquKyUqhFK/n1pkRSZvMD9gQl6VQ05 LbTmkMvHTaymHuX4iC/rBq6pmtnl+mwLsJXIoPd3jPLGwBwxrvzmNCDwYYdrAsRlt9dx 8xBWm9T49FAim2aVxYvNXUqwby0EXROiRbN17HOGBVpBvT+n50/qo6sEXk4B8hMgQbcc S0P6LUxh1CWSpGpQOlrtIDg28BZubYw+USgQIgbwgxOnvCZSF2XI8zKnUgJG96En47Ms 6Cig== X-Gm-Message-State: AOJu0YyV+6yT6PBlB4/qtdahdDJ43V7EJkTiGOKTl0/TGTXOBAreFv0j ajCUXfNdyUriWdObGoKMPpl8pLWfMH8j2c47fI1DGrHKzsfRUUX/h1/k X-Gm-Gg: ASbGncvcqcDzVJBr0eoimDNOAZFQOo+ZciojwcJmzFjrTCjgdPYsAdB198Sl92HDg+N pmdKhpaUtRAQCtIz9NXs9Pnhd+Zocdcup6Vvv7pDQgj/RqZx6ShG30JjTZyqpI972Ji1dFatefm AWj1S3rh9flOFvRsJxajQfDGFiN6MPqhyBuuu2vcxnBGYO2or21ew4A+rxx7EolR6jPB304E8Tv cr9mt6vuBPfD0UhLVRblYhAvxtA1ypQskonIjdECz9/PLAlKOIjo2nOiUJqkaHzJa/JUCcKO7Fc xVyX1jZSS6YvKyZ2s8aP4WIonOWL6hd5S/yQhfcyhKgDZ+zkGkZvad9RNaHsY5SrP9oWi5b/VPH y5ac30tyQWvTtnMSJRr5i6zJ7HEYhCF57M4uxQhm+WAGlz7wxUu9lgkxmCvZGdaxM7Rxh2M1R5S cg2twJZUKsUcj2xK2ZNh8Q/hHnAxA9 X-Google-Smtp-Source: AGHT+IE9t88U+YbG30+3sAtH3TwQfdcfJjdGTXfHXsj1cVp+GivJXuDolUUy+jYGYJG4VW843HKwJg== X-Received: by 2002:a17:903:2c03:b0:248:ff5a:b768 with SMTP id d9443c01a7336-28e9a5134c1mr188374095ad.10.1759836465680; Tue, 07 Oct 2025 04:27:45 -0700 (PDT) Received: from ?IPV6:2405:201:d006:804f:3dc3:e5b1:3dc8:9cf5? ([2405:201:d006:804f:3dc3:e5b1:3dc8:9cf5]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-339a701c457sm19736806a91.23.2025.10.07.04.27.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Oct 2025 04:27:45 -0700 (PDT) Message-ID: Date: Tue, 7 Oct 2025 16:57:41 +0530 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/4] btrfs/290: Make the test compatible with all supported block sizes Content-Language: en-US To: Filipe Manana Cc: fstests@vger.kernel.org, ritesh.list@gmail.com, ojaswin@linux.ibm.com, djwong@kernel.org, quwenruo.btrfs@gmx.com, zlang@kernel.org, linux-btrfs References: <8081c6bcdc56ca2018e51e98e7d3086068f026b9.1758036285.git.nirjhar.roy.lists@gmail.com> From: "Nirjhar Roy (IBM)" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/7/25 16:52, Filipe Manana wrote: > On Tue, Sep 16, 2025 at 4:31 PM Nirjhar Roy (IBM) > wrote: >> This test fails with 64k block size with the following error: >> >> punch >> pread: Input/output error >> pread: Input/output error >> +ERROR: couldn't find extent 4096 for inode 261 >> plug >> -pread: Input/output error >> -pread: Input/output error >> ... >> >> The reason is that, some of the subtests are written with 4k blocksize >> in mind. Fix the test by making the offsets and sizes to 64k so > "... offsets and sizes to 64k..." -> "... offsets and sizes multiples of 64K..." Noted. > >> that it becomes compatible/aligned with all supported block sizes. >> >> Reported-by: Disha Goel >> Signed-off-by: Nirjhar Roy (IBM) >> --- >> tests/btrfs/290 | 16 ++++++++-------- >> 1 file changed, 8 insertions(+), 8 deletions(-) >> >> diff --git a/tests/btrfs/290 b/tests/btrfs/290 >> index 04563dfe..fecec473 100755 >> --- a/tests/btrfs/290 >> +++ b/tests/btrfs/290 >> @@ -106,15 +106,15 @@ corrupt_reg_to_prealloc() { >> # corrupt a file by punching a hole >> corrupt_punch_hole() { >> local f=$SCRATCH_MNT/punch >> - $XFS_IO_PROG -fc "pwrite -q -S 0x58 0 12288" $f >> + $XFS_IO_PROG -fc "pwrite -q -S 0x58 0 196608" $f > Can you please make this more readable and type 192K instead of 196608? > >> local ino=$(get_ino $f) >> # make a new extent in the middle, sync so the writes don't coalesce >> $XFS_IO_PROG -c sync $SCRATCH_MNT >> - $XFS_IO_PROG -fc "pwrite -q -S 0x59 4096 4096" $f >> + $XFS_IO_PROG -fc "pwrite -q -S 0x59 64k 64k" $f > Here you use 64k instead of 65536, which is more readable. > >> _fsv_enable $f >> _scratch_unmount >> # change disk_bytenr to 0, representing a hole >> - $BTRFS_CORRUPT_BLOCK_PROG -i $ino -x 4096 -f disk_bytenr --value 0 \ >> + $BTRFS_CORRUPT_BLOCK_PROG -i $ino -x 65536 -f disk_bytenr --value 0 \ >> $SCRATCH_DEV >> _scratch_mount >> validate $f >> @@ -123,14 +123,14 @@ corrupt_punch_hole() { >> # plug hole >> corrupt_plug_hole() { >> local f=$SCRATCH_MNT/plug >> - $XFS_IO_PROG -fc "pwrite -q -S 0x58 0 12288" $f >> + $XFS_IO_PROG -fc "pwrite -q -S 0x58 0 196608" $f > Same here, 192K. > >> local ino=$(get_ino $f) >> - $XFS_IO_PROG -fc "falloc 4k 4k" $f >> + $XFS_IO_PROG -fc "falloc 64k 64k" $f >> _fsv_enable $f >> _scratch_unmount >> # change disk_bytenr to some value, plugging the hole >> - $BTRFS_CORRUPT_BLOCK_PROG -i $ino -x 4096 -f disk_bytenr \ >> - --value 13639680 $SCRATCH_DEV >> + $BTRFS_CORRUPT_BLOCK_PROG -i $ino -x 65536 -f disk_bytenr \ >> + --value 218234880 $SCRATCH_DEV >> _scratch_mount >> validate $f >> } >> @@ -166,7 +166,7 @@ corrupt_root_hash() { >> # corrupt the Merkle tree data itself >> corrupt_merkle_tree() { >> local f=$SCRATCH_MNT/merkle >> - $XFS_IO_PROG -fc "pwrite -q -S 0x58 0 12288" $f >> + $XFS_IO_PROG -fc "pwrite -q -S 0x58 0 196608" $f > Same here, 192K. > > Also please always cc the btrfs mailing list for changes to btrfs tests. Sure. I will change all the 196608 to 192k and send an updated version. --NR > > >> local ino=$(get_ino $f) >> _fsv_enable $f >> _scratch_unmount >> -- >> 2.34.1 >> -- Nirjhar Roy Linux Kernel Developer IBM, Bangalore