From patchwork Wed Feb 12 17:01:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972180 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD968253B51; Wed, 12 Feb 2025 17:02:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379737; cv=none; b=AbaMwV638rY53wKd1gwFLr7mnvB3qc/ZY6onZb1r2/x3Tf2mlkxYWJ603UnQQkhcDQxl8AuJCIFhUfI12ccRrSy0SMhTKGEnWID4gPph1sKx/ozj5meh8dkdfc8JkXXZ5mtC7TuItu5cSRCDRRjlD8wG52ovTD08Obe5JCSfpGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379737; c=relaxed/simple; bh=mEA6zR7taKLZ1OBPGOXVQmZv+1C07ayZnEAe5m9zUf0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WDw/EiDcM6+2fIIrDomPh2V1Q0rlmC56VT9wxsAIGlICT3zOAsh7CgXojt9niV+B6s+steSmkPazxJk8QAVH3KcNp5qj9+ZOo8EUNAwbBpOV+spaHdIEz00DbjJlXNlHi5nA9CVph7dWRIDLpxUwYMi3z06z81z4zlxttgXagok= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D6IBa1tk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D6IBa1tk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44A4EC4CEE2; Wed, 12 Feb 2025 17:02:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739379737; bh=mEA6zR7taKLZ1OBPGOXVQmZv+1C07ayZnEAe5m9zUf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D6IBa1tkJh6g/yWRvg1qYhbggFXPqoyHQTO9WRR7BalEXcF3fJsryLXWARFWyeZD2 yCFC6XGYAP2S3SBUArghkrxdEXPv/W2/a/tQQBodFaCimDEQW3nisOBv+DStkN0NTp Vm24PBBGeIjHpW58wJ0f5CYoTs7791ylEB9gyB0TmboOmogwPcAJ4/MgPmeRXFRHcN nT4z5YPepWngPdNHgOTyk++xcmpGsQK6myMCkp+Igof9LAD5fcrwEnWEN/gMOB5iUH wXUdqrZKuNdn80JX6M8nsmE3qPW/fZ6gFnrqnVrUYlfR48N0n/3Vbdls1sLXshYw4k voohBjM3TcYNQ== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH 1/8] btrfs: skip tests incompatible with compression when compression is enabled Date: Wed, 12 Feb 2025 17:01:49 +0000 Message-ID: <4a038d084d22c06a7d905b2dc8001f24707f9006.1739379184.git.fdmanana@suse.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Filipe Manana We have several tests that fail when compression is enabled (MOUNT_OPTIONS has "-o compress" or "-o compress-force"") because they expect a fixed extent size and they trigger corruption by writing directly to a device, therefore making them incompatible with compression. So add a _require_no_compress call to them. Signed-off-by: Filipe Manana Reviewed-by: Johannes Thumshirn --- tests/btrfs/215 | 4 ++++ tests/btrfs/265 | 3 +++ tests/btrfs/266 | 3 +++ tests/btrfs/267 | 3 +++ tests/btrfs/268 | 3 +++ tests/btrfs/269 | 3 +++ tests/btrfs/289 | 4 +++- tests/btrfs/297 | 4 ++++ 8 files changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/btrfs/215 b/tests/btrfs/215 index b63ebff6..2418cc90 100755 --- a/tests/btrfs/215 +++ b/tests/btrfs/215 @@ -25,6 +25,10 @@ _require_scratch _require_btrfs_no_nodatacow # Overwriting data is forbidden on a zoned block device _require_non_zoned_device $SCRATCH_DEV +# We need to ensure a fixed amount of written blocks to trigger a specific +# number of read errors and we corrupt by writing directly to the device, so +# skip if compression is enabled. +_require_no_compress _scratch_mkfs > /dev/null # disable freespace inode to ensure file is the first thing in the data diff --git a/tests/btrfs/265 b/tests/btrfs/265 index 0fa55a7f..5640e714 100755 --- a/tests/btrfs/265 +++ b/tests/btrfs/265 @@ -20,6 +20,9 @@ _require_btrfs_no_nodatacow _require_odirect # Overwriting data is forbidden on a zoned block device _require_non_zoned_device "${SCRATCH_DEV}" +# We need to ensure a fixed extent size and we corrupt by writing directly to +# the device, so skip if compression is enabled. +_require_no_compress _scratch_dev_pool_get 3 # step 1, create a raid1 btrfs which contains one 128k file. diff --git a/tests/btrfs/266 b/tests/btrfs/266 index 0788ba94..681cefda 100755 --- a/tests/btrfs/266 +++ b/tests/btrfs/266 @@ -21,6 +21,9 @@ _require_scratch_dev_pool 3 _require_odirect # Overwriting data is forbidden on a zoned block device _require_non_zoned_device "${SCRATCH_DEV}" +# We need to ensure a fixed extent size and we corrupt by writing directly to +# the device, so skip if compression is enabled. +_require_no_compress _scratch_dev_pool_get 3 # step 1, create a raid1 btrfs which contains one 128k file. diff --git a/tests/btrfs/267 b/tests/btrfs/267 index 151ccdae..ceba974d 100755 --- a/tests/btrfs/267 +++ b/tests/btrfs/267 @@ -21,6 +21,9 @@ _require_btrfs_no_nodatacow _require_odirect # Overwriting data is forbidden on a zoned block device _require_non_zoned_device "${SCRATCH_DEV}" +# We need to ensure a fixed extent size and we corrupt by writing directly to +# the device, so skip if compression is enabled. +_require_no_compress _scratch_dev_pool_get 3 # step 1, create a raid1 btrfs which contains one 128k file. diff --git a/tests/btrfs/268 b/tests/btrfs/268 index dce5cb95..99e1ee4a 100755 --- a/tests/btrfs/268 +++ b/tests/btrfs/268 @@ -20,6 +20,9 @@ _require_btrfs_no_nodatacow _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices _require_scratch_dev_pool 2 _scratch_dev_pool_get 2 +# We need to ensure a fixed extent size and we corrupt by writing directly to +# the device, so skip if compression is enabled. +_require_no_compress echo "step 1......mkfs.btrfs" diff --git a/tests/btrfs/269 b/tests/btrfs/269 index 129a4a41..183aeb73 100755 --- a/tests/btrfs/269 +++ b/tests/btrfs/269 @@ -22,6 +22,9 @@ _require_odirect # No data checksums for NOCOW case, so can't detect corruption and repair data. _require_btrfs_no_nodatacow _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices +# We need to ensure a fixed extent size and we corrupt by writing directly to +# the device, so skip if compression is enabled. +_require_no_compress _require_scratch_dev_pool 4 _scratch_dev_pool_get 4 diff --git a/tests/btrfs/289 b/tests/btrfs/289 index 86e91021..b340b97d 100755 --- a/tests/btrfs/289 +++ b/tests/btrfs/289 @@ -18,7 +18,9 @@ _require_btrfs_no_nodatacow _require_odirect # Overwriting data is forbidden on a zoned block device _require_non_zoned_device "${SCRATCH_DEV}" - +# We need to ensure a fixed extent size and we corrupt by writing directly to +# the device, so skip if compression is enabled. +_require_no_compress # The errors reported would be in the unit of sector, thus the number # is dependent on the sectorsize. _require_btrfs_support_sectorsize 4096 diff --git a/tests/btrfs/297 b/tests/btrfs/297 index eb4f365e..1f3f7c08 100755 --- a/tests/btrfs/297 +++ b/tests/btrfs/297 @@ -14,6 +14,10 @@ _begin_fstest auto quick raid scrub _require_odirect _require_non_zoned_device "${SCRATCH_DEV}" _require_scratch_dev_pool 3 +# We need to ensure a fixed extent size and we corrupt by writing directly to +# the device, so skip if compression is enabled. +_require_no_compress + _fixed_by_kernel_commit 486c737f7fdc \ "btrfs: raid56: always verify the P/Q contents for scrub" From patchwork Wed Feb 12 17:01:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972181 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7F08212B31; Wed, 12 Feb 2025 17:02:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379738; cv=none; b=L8O3Tko1LXPamyc8g0UNMe7FC5qIxBQ3ASJkrWlp7DSCS3VeX96QTDq2swPGEUgM5y0Pj9C8obKR3RhfVFrKku7WRUPqhYp0hy0ENPw36tKZOGc9+fe16oXDajKmgaRi3AEn/p1kvMBh1yHnSp50iPEq4BlkK/QxnhKMAEnAWzY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379738; c=relaxed/simple; bh=wQdIuWLdrKAF+/zcUz4/kR4beRBYI0ynkYZlPoZDmXI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CJL2wjIDuy5J7JkPaBBCHFpJ0MJKAjPS73xAqvg7STpo/jvc6AJScQNY8DhBWTKl5BLOwcwxhs89WuTtTr8IouSFTgD3uig+Rr/IEnPZjXhny28+jxxQxf2T1Zfkf9J4YCrXHBaQlFpOAxEKsHyDwqnrteCWYmVkIzWxhTFiDpY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FgbAHsLw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FgbAHsLw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8BC1C4AF0C; Wed, 12 Feb 2025 17:02:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739379738; bh=wQdIuWLdrKAF+/zcUz4/kR4beRBYI0ynkYZlPoZDmXI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FgbAHsLw+9lK7Kx4av2++3cKoNlVHs9rPDUuOZNjgPILKfhPwLyTJaTHuqh2t37R3 481ccU75K0vkwtUMNtxWCTklY/tET+4s1a/RZKqPv2QDxdg1NIBFRVztBS95yARkqO vz9H1HUMuiSgpJy4RZsJOko4hTQ9mNauGPnFgxdsV/sHgq1Cyh59dwvLpBu2aBY4Xa ogCgz94WxR+GRWsLuiE0IWICUAzioWlM9bJrL6ImBn6oUp07+5CvcldXOkEY/I8XzZ 7cY5i3vZc2MEdnMajpmQZg4iNo/+M7cypEtjRbtPXUnj3O1QhPpAmIBGYl1/b5Nt0F e+B/pAaBNSQyg== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH 2/8] btrfs/290: skip test if we are running with nodatacow mount option Date: Wed, 12 Feb 2025 17:01:50 +0000 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Filipe Manana We exercise corrupting an inline extent and inline extents can't be created with nodatacow, we get instead a regular file extent item and if we attempt to corrupt its disk_bytenr field with btrfs-corrupt-block we fail tree-checker validation at mount time resulting in failure to mount and the following in dmesg: [514127.759739] BTRFS critical (device sdc): corrupt leaf: root=5 \ block=30408704 slot=8 ino=257 file_offset=0, invalid disk_bytenr for \ file extent, have 7416089308958521981, should be aligned to 4096 [514127.762715] BTRFS error (device sdc): read time tree block corruption \ detected on logical 30408704 mirror 1 So add a _require_btrfs_no_nodatacow call to the test. Signed-off-by: Filipe Manana Reviewed-by: Johannes Thumshirn --- tests/btrfs/290 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/btrfs/290 b/tests/btrfs/290 index 1a5e267b..04563dfe 100755 --- a/tests/btrfs/290 +++ b/tests/btrfs/290 @@ -30,6 +30,18 @@ _require_xfs_io_command "pread" _require_xfs_io_command "pwrite" _require_btrfs_corrupt_block "value" _require_btrfs_corrupt_block "offset" +# We exercise corrupting an inline extent and inline extents can't be created +# with nodatacow, we get instead a regular file extent item and if we attempt +# to corrupt its disk_bytenr field with btrfs-corrupt-block we fail tree-checker +# validation at mount time resulting in failure to mount and the following in +# dmesg: +# +# [514127.759739] BTRFS critical (device sdc): corrupt leaf: root=5 \ +# block=30408704 slot=8 ino=257 file_offset=0, invalid disk_bytenr for \ +# file extent, have 7416089308958521981, should be aligned to 4096 +# [514127.762715] BTRFS error (device sdc): read time tree block corruption \ +# detected on logical 30408704 mirror 1 +_require_btrfs_no_nodatacow _disable_fsverity_signatures get_ino() { From patchwork Wed Feb 12 17:01:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972182 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87EE5212B31; Wed, 12 Feb 2025 17:02:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379740; cv=none; b=Qm/UXMU1dZ8Ojc+atA8on+WIufCWdlWq60TJoSK043e8NnXAA/7y+2xw4htvDoZQXakSfSpivZy+d4laoN7hKLCeFyN2gQ9eVjSqSbsnYA7ahuAM+C3NWjma7bzytqu8dEUonDWxjV7djxA+gkT2vr+Bt3TcfkbLOTeTDslDosY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379740; c=relaxed/simple; bh=Wpsh4Ts1egTSW7ONd78SFEbizpWPMd2HbdycK3gy2bQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KR8L6bovQdsGTiyBkWikjHgjAlljNLBcCzrmYVlIzjwyqYC1mTtr4pULzK0Y7FBFqy0r9gnt1DgZLr7/swvcOprr//NSCAP6QkqDrjTBPomgMFVXy5E3XGNL/8CV6JQ4rsy9zydsucC1iTNb1WPIss0c/T1Ytb0pah93i8uWWg0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TqFf51az; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TqFf51az" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17612C4CEE4; Wed, 12 Feb 2025 17:02:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739379740; bh=Wpsh4Ts1egTSW7ONd78SFEbizpWPMd2HbdycK3gy2bQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TqFf51azqHbXAVZ7ZkLAl9jLFOD8AL71efxg++FkP/S/VCkyAQFytQ2meMsPZXVYh u8kLBPfVXd3aNl+EozP4QYeJHzdc2e8ZWllfwJ4RE6xJeTh0bz6zJwNQbjv3p9qaSE xvDxd2JaBmt8Tzru8PsCaHxkHxlRImwruob9DXGYhY6cZBz4voZ96K8/xn1wshAnIz LsNBJgECLczOb491/OtgcyHS4tS5SnE74rZjtEVkCK8QKfliEmGsQOnn47zJaUeSR1 VQmeClq33vgTMihSEnwR67GglpU1IKgNzfiOfwUqkhRlNvMhkOt1u52+Ltw0e3Wopu l9Am78oDpcM/g== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper Date: Wed, 12 Feb 2025 17:01:51 +0000 Message-ID: <09d16bf76cfe7317f584c2bbaeacb2ee810dcd99.1739379184.git.fdmanana@suse.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Filipe Manana Add a _require_btrfs_no_nodatasum helper to skip a test if the nodatasum mount option is give, as we do have several tests that fail, for several reasons, when that mount option is passed. Signed-off-by: Filipe Manana Reviewed-by: Johannes Thumshirn --- common/btrfs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/btrfs b/common/btrfs index 5d69ddd8..a3b9c12f 100644 --- a/common/btrfs +++ b/common/btrfs @@ -134,6 +134,13 @@ _require_btrfs_no_nodatacow() fi } +_require_btrfs_no_nodatasum() +{ + if _normalize_mount_options "$MOUNT_OPTIONS" | grep -q "nodatasum"; then + _notrun "This test requires no nodatasum enabled" + fi +} + _require_btrfs_free_space_tree() { _scratch_mkfs > /dev/null 2>&1 From patchwork Wed Feb 12 17:01:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972183 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89254257AC8; Wed, 12 Feb 2025 17:02:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379741; cv=none; b=lvdkzSGsoyTra/m4hAau2sPpBmJi9vHrND90zaEoLyw9+Xpes/ExoECl8MIjJOk/uexxudQ75mXjWnfqHKfAEvduU9ZtI1wC9XOnY5UoCNChVyKqb9g6hx4DWDSTGV8hFzyOAbCPFyguIALdAtbsU512JTelK2Xx9osdkftAh6Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379741; c=relaxed/simple; bh=DoNqZJ2DPe1zFDQ4bf7WJ0G8ryPUf21H7QmEJcl3+2Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HB+KKhSv9rEiYi360CsfoplCWoMrjlkk32J8nrJvXMTQAhNKFsrpP3MyJLjc6vJ5d+/y8iVClaOVmYtmM3Zt0C4so7pVrube9ZtT1J6LfBjUZkTIcO+tRizoQGSNU7Sg+u1bGDh6WixkURPKhyqoj3jNiNTfweePEjFN8R6RG4E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pg1gdU75; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pg1gdU75" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AC00C4CEDF; Wed, 12 Feb 2025 17:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739379741; bh=DoNqZJ2DPe1zFDQ4bf7WJ0G8ryPUf21H7QmEJcl3+2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pg1gdU75/qKhYfQ4muFCTDDmiIQp10trkIWqjZfnP1HCQDm5lc5pf2na4NxVVOexp PonuhuybUoWGxvj23CWvuCVQLGS+zXf26XUFAsfH+T11+XsZkeHjVg1t64WU7+f1BY 6zty5pYrFXtAWnVtsk0zESK2y46yb0KklAYlAxMmcChryvvE3YUNcF90kNDfu7I9XB oDy97oyd1bgflu3nu7LPId/3UyiXxYEkdgLR6MPhrF9szniLXHKT8fbizRbfAIr1lI qE2tzgY14I8zVKiPNXS/pbJj9B1R0PH6xx2sm5+qP/4Q/9Y+LPxUPMCviwGat/MMT0 OCX/b1tAHfypw== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum Date: Wed, 12 Feb 2025 17:01:52 +0000 Message-ID: <2b9009f68ee7581816810b70f9ceb2c94eb9d2b2.1739379184.git.fdmanana@suse.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Filipe Manana Encoded writes are reject for inodes with the NODATASUM flag, so we must skip the test if running with either the nodatasum or nodatacow (which implies nodatasum) mount options. So skip the test when under nodatacow and nodatasum mount options. Signed-off-by: Filipe Manana Reviewed-by: Johannes Thumshirn --- tests/btrfs/333 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/btrfs/333 b/tests/btrfs/333 index 14cecdbc..6214d7c5 100755 --- a/tests/btrfs/333 +++ b/tests/btrfs/333 @@ -14,6 +14,11 @@ _begin_fstest auto quick compress rw io_uring ioctl _require_command src/btrfs_encoded_read _require_command src/btrfs_encoded_write _require_btrfs_iouring_encoded_read +# Encoded writes are reject for inodes with the NODATASUM flag, so we must skip +# the test if running with either the nodatasum or nodatacow (which implies +# nodatasum) mount options. +_require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum do_encoded_read() { From patchwork Wed Feb 12 17:01:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972184 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBE612580CF; Wed, 12 Feb 2025 17:02:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379743; cv=none; b=UJOAnBcGfLUm0yZZ+IThd4KuGNnxkdSimPacE0jI37NT1nD2Vdn7xrUA+5EzqtyuAFAfSCqb9OiFcVPLQtFQMeKiXHeSSzoXkCw97ShhWpxY7FviqJRZehK2VWqASIqxge/eCKSJ/M81ordpqni35kQIh6yjwI6Duz6kT7eFOMc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379743; c=relaxed/simple; bh=zL2i+NOW7siMRPylPeLh9PgpkpTe5QBsef1RNuJDQdc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lqgXWACG6VQt/kCUhEypUZpTUgnntgYhtsb7jbEHtOZISQKSIrsbC8v0iN7RiPtchNbqYYASTesnhTk/3oVKpjTnRRJgG2tE0/AFPITGaZf0M+IT1PoB0Iq9t3VsWr033o+r5ixYA58j5OAt3twHu7jVZ7chghCGidMhXA3II7s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JyuaP8A6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JyuaP8A6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDD39C4CEEA; Wed, 12 Feb 2025 17:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739379742; bh=zL2i+NOW7siMRPylPeLh9PgpkpTe5QBsef1RNuJDQdc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JyuaP8A6eIpkQ1lIPaOhwz5oF0unJfgY+axtBnhzpKAk31s1STEYt6Lofms4M7Guz HUrXkJVpZr7QbK663TY1h/VZrF4G6VdalO/DEJuDiGC2hE6uPNQxEtECbBKUJsUOp5 a+zkQBRGhrUnQRFhXfL/W7l2FszVJmIdyXJRmlSqS2LZ/KgrlKhoAYvOjGiNj5kTxv sBa7+KM6TufxbiUvOMaSjvfJBxy5iCJ6e1EHK++PK/1zrkyaEtAPflMn6gpxzJhHOe SrmL8P5Jwr0M6c+n9HRbA0cWZbkc368l7TCUBhxEBT96w0Ad0J9uptH5olUZ+8EQDJ M5kwd2GKywSMg== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH 5/8] btrfs/205: avoid test failure when running with nodatasum mount option Date: Wed, 12 Feb 2025 17:01:53 +0000 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Filipe Manana Currently the test fails when we pass "-o nodatasum" in MOUNT_OPTIONS and the reason is because we enable compression, with "chattr +c", on a file and then try to clone from it to a file with nodatasum inherited from the mount options, which results in the clone ioctl to fail with -EINVAL since it's not possible to clone from datasum to nodatasum and vice-versa. Fix this by removing the "chattr +c", as it's not needed and we already exercise the compression scenario by explicitly cycle mounting the scratch device with "-o compress". This also allows us to exercise cloning the "foo1" file without compression. I originally added the "chattr +c" call but this was probably an oversight while debugging something. Signed-off-by: Filipe Manana Reviewed-by: David Sterba --- tests/btrfs/205 | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/btrfs/205 b/tests/btrfs/205 index 13a1df8b..71522492 100755 --- a/tests/btrfs/205 +++ b/tests/btrfs/205 @@ -21,7 +21,6 @@ _begin_fstest auto quick clone compress prealloc _require_scratch_reflink _require_xfs_io_command "falloc" "-k" -_require_command "$CHATTR_PROG" chattr _require_btrfs_fs_feature "no_holes" _require_btrfs_mkfs_feature "no-holes" @@ -33,7 +32,6 @@ run_tests() # extent. It has a file size of 128K. echo "Creating file foo1" touch $SCRATCH_MNT/foo1 - $CHATTR_PROG +c $SCRATCH_MNT/foo1 > /dev/null 2>&1 $XFS_IO_PROG -c "pwrite -S 0xab 0 4K" \ -c "fsync" \ -c "pwrite -S 0xab 4K 124K" \ From patchwork Wed Feb 12 17:01:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972185 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC099254B09; Wed, 12 Feb 2025 17:02:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379744; cv=none; b=XyoRno3q5dRHtUECaWzWfZoalAPfV9Rty3Uw6HJKUk+5hss3iE2yvSGlzXNGZYEVYqnZiUZsqhnBlF+7v16U//ukcj2EVuWxSYcr60owL7sEoZFnv33nNLjCZ4Q5SuQc+zW8DoSABeT+wmYVg1+Cz9k3dmPiYV/wV2pq7HXpDyA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379744; c=relaxed/simple; bh=YAX+qxIcE/XtJa2HS8/EY/sAhnhF6Vp8gg0UUCqZAds=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fs/RgqbZ+XDAAsAYrSCw4f4PfXIJI7FM2f9Sa3O2/mSlCEUmGLmIgGEKr7s2yJAMS5bojvMX03BldZwUXwObnWKWdqmTXAP3wIZ0OlH76s4Dv4aDIvYqrs+YxSFUN5MkUxGWkrPpPnaTZRrOJstZW+7dv3PnRBp1L5QjMjzz3b0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Nda9O3hJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Nda9O3hJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D16AC4CEE4; Wed, 12 Feb 2025 17:02:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739379744; bh=YAX+qxIcE/XtJa2HS8/EY/sAhnhF6Vp8gg0UUCqZAds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nda9O3hJNrQsQcrdV0d6NWHBoiC6trKDDiuBjUBZEAl1dW5O7oEtMuUGChiSZgeQ5 /+equ2BNaHkgS4cDWVgqDsdZGpPeiU5DsVUqAdNbHuCRrRWIPdgxkR7hkIONWgRdYv X2ORbCwiIp2C1Ol5h8iFAn1mhnba2075z26T9deJV+pBH6Y98tSi1HGOFGpuSHCQ3P tZX9EbuMJdh0U7VgFZcp8WHXyCcaVL9orF1WVoKsKQE/mkfzOnJtzj/9L+frRmau6d NjCKeZl+iE4CoVWTOFVvzKGP+Fl3fwxcdHlx1KfieVGuyZ/5PBnnpAmdeXZgpY5764 dAEPYQS/8IgOw== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum Date: Wed, 12 Feb 2025 17:01:54 +0000 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Filipe Manana Several tests exercise corrupting data and then checking that on read the data is repaired, but this requires using checksums, so the tests fail when running with the nodatasum mount option. So add a _require_btrfs_no_nodatasum call to these tests. Signed-off-by: Filipe Manana --- tests/btrfs/140 | 4 +++- tests/btrfs/141 | 4 +++- tests/btrfs/157 | 4 +++- tests/btrfs/158 | 4 +++- tests/btrfs/215 | 4 +++- tests/btrfs/265 | 4 +++- tests/btrfs/266 | 4 +++- tests/btrfs/267 | 4 +++- tests/btrfs/268 | 4 +++- tests/btrfs/269 | 4 +++- tests/btrfs/289 | 4 +++- 11 files changed, 33 insertions(+), 11 deletions(-) diff --git a/tests/btrfs/140 b/tests/btrfs/140 index b2c8451d..cb70f967 100755 --- a/tests/btrfs/140 +++ b/tests/btrfs/140 @@ -17,8 +17,10 @@ _begin_fstest auto quick read_repair fiemap . ./common/filter _require_scratch_dev_pool 2 -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum _require_btrfs_command inspect-internal dump-tree _require_odirect # Overwriting data is forbidden on a zoned block device diff --git a/tests/btrfs/141 b/tests/btrfs/141 index 3d48dff3..4afd3304 100755 --- a/tests/btrfs/141 +++ b/tests/btrfs/141 @@ -17,8 +17,10 @@ _begin_fstest auto quick read_repair . ./common/filter -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum _require_scratch_dev_pool 2 _require_btrfs_command inspect-internal dump-tree diff --git a/tests/btrfs/157 b/tests/btrfs/157 index c49229f0..00393fc8 100755 --- a/tests/btrfs/157 +++ b/tests/btrfs/157 @@ -25,8 +25,10 @@ _begin_fstest auto quick raid read_repair . ./common/filter -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum _require_scratch_dev_pool 4 _require_btrfs_command inspect-internal dump-tree _require_btrfs_raid_type raid6 diff --git a/tests/btrfs/158 b/tests/btrfs/158 index ff28defe..87d16cdf 100755 --- a/tests/btrfs/158 +++ b/tests/btrfs/158 @@ -17,8 +17,10 @@ _begin_fstest auto quick raid scrub . ./common/filter -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum _require_scratch_dev_pool 4 _require_btrfs_command inspect-internal dump-tree _require_btrfs_raid_type raid5 diff --git a/tests/btrfs/215 b/tests/btrfs/215 index 2418cc90..bd82fb79 100755 --- a/tests/btrfs/215 +++ b/tests/btrfs/215 @@ -21,8 +21,10 @@ get_physical() } _require_scratch -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum # Overwriting data is forbidden on a zoned block device _require_non_zoned_device $SCRATCH_DEV # We need to ensure a fixed amount of written blocks to trigger a specific diff --git a/tests/btrfs/265 b/tests/btrfs/265 index 5640e714..823d4d96 100755 --- a/tests/btrfs/265 +++ b/tests/btrfs/265 @@ -15,8 +15,10 @@ _begin_fstest auto quick read_repair _require_scratch_dev_pool 3 -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum _require_odirect # Overwriting data is forbidden on a zoned block device _require_non_zoned_device "${SCRATCH_DEV}" diff --git a/tests/btrfs/266 b/tests/btrfs/266 index 681cefda..bffcec27 100755 --- a/tests/btrfs/266 +++ b/tests/btrfs/266 @@ -14,8 +14,10 @@ _begin_fstest auto quick read_repair . ./common/filter -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum _require_scratch_dev_pool 3 _require_odirect diff --git a/tests/btrfs/267 b/tests/btrfs/267 index ceba974d..b4ea3106 100755 --- a/tests/btrfs/267 +++ b/tests/btrfs/267 @@ -16,8 +16,10 @@ _begin_fstest auto quick read_repair _require_scratch_dev_pool 3 -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum _require_odirect # Overwriting data is forbidden on a zoned block device _require_non_zoned_device "${SCRATCH_DEV}" diff --git a/tests/btrfs/268 b/tests/btrfs/268 index 99e1ee4a..7681b1a5 100755 --- a/tests/btrfs/268 +++ b/tests/btrfs/268 @@ -15,8 +15,10 @@ _begin_fstest auto quick read_repair _require_scratch _require_odirect -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices _require_scratch_dev_pool 2 _scratch_dev_pool_get 2 diff --git a/tests/btrfs/269 b/tests/btrfs/269 index 183aeb73..c048da44 100755 --- a/tests/btrfs/269 +++ b/tests/btrfs/269 @@ -19,8 +19,10 @@ _begin_fstest auto quick read_repair _require_scratch _require_odirect -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices # We need to ensure a fixed extent size and we corrupt by writing directly to # the device, so skip if compression is enabled. diff --git a/tests/btrfs/289 b/tests/btrfs/289 index b340b97d..1e8336a7 100755 --- a/tests/btrfs/289 +++ b/tests/btrfs/289 @@ -12,8 +12,10 @@ _begin_fstest auto quick scrub repair . ./common/filter _require_scratch -# No data checksums for NOCOW case, so can't detect corruption and repair data. +# No data checksums for NOCOW and NODATACOW cases, so can't detect corruption +# and repair data. _require_btrfs_no_nodatacow +_require_btrfs_no_nodatasum _require_odirect # Overwriting data is forbidden on a zoned block device From patchwork Wed Feb 12 17:01:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972186 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3863021148A; Wed, 12 Feb 2025 17:02:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379746; cv=none; b=LI07Y91hUfryAD4FaBKwA6lDGXelgwE+K1VQR4mPP6h/Rq67uS5tbJbuZsWbtwW85WK7/nzTIYIqYBx8urSa1m9B1sno6PDN6gIsnvfDRhMMtMJYtvf29buTQhjA3PZDfGk8cVXThHOPV5VyJgWEoLX8NHtxZ0PsI7o0vz7zxc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379746; c=relaxed/simple; bh=mGFeUFm6CQXz1/fY13orhUrFgomB919ocYfDixHX0KE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sLIyrhQcb7BbMWjAmaIny0mfALKdLfkdHUftj1ZLgEopVAt51nD3W2cwKeGI6CymCHUTfZcowJgPKNUkrE5qoMyigxWxglYcniX8qJlSHEzKOpfkyRkyoDta3ydLeCMSdyvWElW0PqJQ/qVpCAfrTUfe9j6RFXfN7plpyTwzkQ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=llNpyxac; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="llNpyxac" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0E4AC4CEE2; Wed, 12 Feb 2025 17:02:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739379745; bh=mGFeUFm6CQXz1/fY13orhUrFgomB919ocYfDixHX0KE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=llNpyxacjUhbk6SjfDc7wLS8JI3eV/AmwEBao8RSl4BrzNBub01HIutk2lAA9XeJL +4VrkrDZcXeNrR+Y8/lgyBSAcitqhN/pWVRNQEuvkWHTEaWNrYWVN2pFpAUpfR4trH af6l/GReFydfqMsVsdphvdGBMJcLQmgRDiCZr4ZLnce9uB0d5LWdH4VkPOuyAHoJR4 9PWDUrH72zeOGogJKJ9hjm0rpBlUevWOQLLwax1FT7zZf0kS+Qa3CjC4ddJoULPJ3J JROYog+9++8LVEDyNUi+MklHl/7IHq6tbsywuJ08LzYHJb/1yMrp4E/bIfKTnTxg2P B9y6LuD+J0Twg== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH 7/8] btrfs/281: skip test when running with nodatasum mount option Date: Wed, 12 Feb 2025 17:01:55 +0000 Message-ID: <39ba965d983d0344f605ff01744304ba579527af.1739379186.git.fdmanana@suse.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Filipe Manana The test exercises compression and compression doesn't happen on inodes with checksums disabled (nodatasum), making the test fail the expectations if getting compressed extents. So skip the test if nodatasum is present. Signed-off-by: Filipe Manana Reviewed-by: David Sterba --- tests/btrfs/281 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/btrfs/281 b/tests/btrfs/281 index 855dd824..8fb7158a 100755 --- a/tests/btrfs/281 +++ b/tests/btrfs/281 @@ -25,6 +25,8 @@ _require_btrfs_send_version 2 _require_xfs_io_command "fiemap" _require_fssum _require_btrfs_no_nodatacow +# Compression can't happen with nodatasum, so skip the test. +_require_btrfs_no_nodatasum _fixed_by_kernel_commit a11452a3709e \ "btrfs: send: avoid unaligned encoded writes when attempting to clone range" From patchwork Wed Feb 12 17:01:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972187 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3168D2586DD; Wed, 12 Feb 2025 17:02:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379747; cv=none; b=DT2dctq0nmHCRupri+AaIKozgto2QSrPw+1qX+GYH8K4NooNXAG9ytlvtsmyOSb/xmiGs1fYeji4xhd2zz1gCM01J4JJ6ex9GuVk667y5d2wRJ+WTHGVFAwmGBlMWOFWBXatSxH6ZPFR8B70/eLswFVDFnemAkhaJYFvl0sAjlw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739379747; c=relaxed/simple; bh=Gb//+2DMieZeX9z5NvgUybYc2HCQx3COjmFxat6FNck=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cz7uEv6FxZb9PbIVrLhUHjUn/lfutEjCLdQZg05fzCecXD0gD6PVbjZfv39l/W+vFaovrFj2XcUvHLsJLGzBj+thC3EHotNPPHKVvQotTHqSIXNa1XAq1mYiDi9y2i+aa3s6waoPABMbMe2jco8Q0SCe0HDxXRO5ZXAxjNPGJAo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LRAtDysL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LRAtDysL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2109EC4CEDF; Wed, 12 Feb 2025 17:02:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739379747; bh=Gb//+2DMieZeX9z5NvgUybYc2HCQx3COjmFxat6FNck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LRAtDysLqW1lswv82uxVETtD0FrIyeGMUIr7LrD/J126+Jmaq+N7QHNQ3O9wtlPFT csa1s3MN3H8UyI1NuOAD69aZqAscQ3LiIcFdD5VkuVuVfb0e1QKAzc54LJxzjD9d2h wwDI7hQeRglpAZGKDc7uHU2ylkBYWjmlafrLttf1SZLjsNQAwOuPRktCjKG3VgB8wp lObHJCd+5qfReBXloTrPp0O8wtd3+u7EIO6U3ckBhf+zYkl6pTzsEQhU5bi0xF6f5n DulWSaIEid064kgYtTrWhIhQTc9znf7RUdRcvD/JojQ48im+an9dzefwg/QCLEzsLG djM31cTI8EjZQ== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH 8/8] btrfs: skip tests that exercise compression property when using nodatasum Date: Wed, 12 Feb 2025 17:01:56 +0000 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Filipe Manana A couple tests exercise the compression property and that fails when an inode has the nodatasum flag set. So skip the tests when running under the nodatasum mount option. Signed-off-by: Filipe Manana Reviewed-by: David Sterba --- tests/btrfs/048 | 3 +++ tests/btrfs/059 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/btrfs/048 b/tests/btrfs/048 index a38c3951..3676debe 100755 --- a/tests/btrfs/048 +++ b/tests/btrfs/048 @@ -28,6 +28,9 @@ _require_scratch _require_btrfs_command "property" _require_btrfs_command inspect-internal dump-super _require_btrfs_no_nodatacow +# We exercise setting compression through properties, and that fails on inodes +# with nodatasum, so skip when mounting with nodatasum. +_require_btrfs_no_nodatasum send_files_dir=$TEST_DIR/btrfs-test-$seq diff --git a/tests/btrfs/059 b/tests/btrfs/059 index 227ebb14..3da6a5a9 100755 --- a/tests/btrfs/059 +++ b/tests/btrfs/059 @@ -26,6 +26,9 @@ _require_test _require_scratch _require_btrfs_command "property" _require_btrfs_no_nodatacow +# We exercise setting compression through properties, and that fails on inodes +# with nodatasum, so skip when mounting with nodatasum. +_require_btrfs_no_nodatasum _scratch_mkfs >> $seqres.full 2>&1 _scratch_mount