From patchwork Wed Feb 12 23:34:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972594 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 DCC0221324C; Wed, 12 Feb 2025 23:35:15 +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=1739403316; cv=none; b=qoyWAOAXp7YC1cnYpMuigeieI1vno/g9gCnt50IonQVuCzMa8SC2C0guwDVDLW326pLFZHQt/nzS4eVlGr/5HCGcKn9gRwKtz3ZDlyGBkQYoBsMH708rBJGYPAUhesI78284yZK7jhFRfFvDx72bfXNRNqRCHi4NWAPbIKMXIQA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739403316; c=relaxed/simple; bh=5cqsjQHVCF6lM0enUHHTi62zyBAIBPtNBz6VIlRFwrg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G1nw5h8325n2qcsZjUF8nWI2nC3wMNtYsgWZVLfvGSy/C8yd3XKo9kh/YNTs5ZOpNlyex9kGPDo/EIUXllx0eU4NEhgU7VpyspYDDcfbFKOq+GbtqP49SFnn2G/HqdTG9J4fd6g6GEUoXcE32C9dkbbXu9xuEvDhIqpuJLVBKUY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=U5KbuPNu; 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="U5KbuPNu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33066C4CEE5; Wed, 12 Feb 2025 23:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739403315; bh=5cqsjQHVCF6lM0enUHHTi62zyBAIBPtNBz6VIlRFwrg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U5KbuPNu+4hyrdBlfHJZRkRPG0NIEU3RQ2Ro4pLjEmlaBDx5ng/lKiAxDqFn8xkog O6dCEWM+ZF0c+1cA+UQ8cfGpGQUKfZN5c6Qjtu5m0cqeCgNOR5UiDtUtHfzn9QBMM4 12DZAuuhOOlPzr6ESua9He4m+wMZjTyYJdfY8KARFL9jntx4VloHJP1YOG33o40but 6zgr/d6VAkFrAp0J3kayn9CbLgnaumI79eGQvDj9shohZFGwj0tiPQAhQ+yZV7DHWf loWI8zlbx8iDwahl76zCI/0r+LXfIBS8Hz3sTOEAXpiOIH5iwE4hu+QGqB7XPghgQW 8+dndc//Rv6lg== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana , Johannes Thumshirn Subject: [PATCH v2 1/8] btrfs: skip tests incompatible with compression when compression is enabled Date: Wed, 12 Feb 2025 23:34:59 +0000 Message-ID: <700c5fba050de47dfece422a96a3b179567c1874.1739403114.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. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana --- 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 23:35:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972595 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 646C8209F47; Wed, 12 Feb 2025 23:35: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=1739403317; cv=none; b=kjp+sfHA/eBAgSDgtL2rrgBFoXprXdXX14Q0ZWhxYfCpQEXMciz1GrMYw9fGwCy6MAG8WdXecG/6T3orEW6GHbnH7XQGEcX6wKXnDkstbf9yEWI4OBwdJlNmUTEUVVHOhfPL50R+Rl5PUfuVRzWxHS8xIgdp9rdOo3HBu+4XMNg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739403317; c=relaxed/simple; bh=IwF9p8RpzpaOLJFPhdpibT8vTNIOotaahsRIavjp5e4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n2NuAyNfe8xlDztgE0KgOCd8rUFtRx2/Q+XWTbJb/hcE/UT6dkUuxFQn57gIjI6KqHwzRe6v9jvCqjmBJId12mMMrvY7pxWydtXfzPCNJfQiVzEQ0ZaGYnrkzug9l8+Qat2sM4wASx0/KInFc8EghRSicKBxrzHzBl5r8oNE8wI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=g5P/9x07; 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="g5P/9x07" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3FE7C4CEDF; Wed, 12 Feb 2025 23:35:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739403316; bh=IwF9p8RpzpaOLJFPhdpibT8vTNIOotaahsRIavjp5e4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g5P/9x07r5fMuLMCD4ZSXzpOuyEovBMpcAo6hrLZwVVg9nfOHYx+mJMkS58TRly/r QO9S8ptr6l0uT76Cie5W0VIgAAP3ht+uvXOrthv58pXuQWBxZ6rsPasCWSRgOGhtBV 8FeScT98beCbKSi1fpLnOG/yajKHIE/gHbcBcO1N/eUgqUrp9NaZXxGqMrVCGDND/e FNORpn5qwHEQNj3VCRqie28ExtTJydEMsAMfIERbeVxTsjQLwJwtlmbAfO7rV5AZf5 VDWF7Z32oEdyVHU4uuoBACDu4veu1cLmMERRdDb+ilvIQuNKj0n2H75+SBRTB8zvnG NUgwwWuCQ26xw== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana , Johannes Thumshirn Subject: [PATCH v2 2/8] btrfs/290: skip test if we are running with nodatacow mount option Date: Wed, 12 Feb 2025 23:35:00 +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. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana --- 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 23:35:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972596 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 15A72209F47; Wed, 12 Feb 2025 23:35: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=1739403319; cv=none; b=BN3lQsnekMT3xZYuLgzmpQWHFg8jIL6MMUM+j+o+WD9z7TnkUnJVUB9Lt4JNiETYAsQqaDLh5z/Uvl7LKdzW8RtctDZImWemAQGzaG565r8aW2BP2Y15tTpGMpcAINx8TRFfhsJVmJPl9yiLmF1IvbJk5KnQz8ZN46aT7pol3TI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739403319; c=relaxed/simple; bh=exydtoSr3R4bULzA95T6rznMexFiiJKDUKLRXqVuk7I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XQ+4aVYxS2n8DlfDl1hYfXR6TXtapBtWz6dvL5IVd//g1Fvw6SFNzRub+qvH89RSSnLq/jYd8c0bHzn+LkkB6X0M2N9rjk0TXq9AcbNpRwMdgj2V/65E2RUnc7g8KQSrdjog682BYh/S4A+gVEfNjQGPHcUd/2pBFuPkyy32BlA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bssBHY5e; 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="bssBHY5e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EFD5C4CEE4; Wed, 12 Feb 2025 23:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739403318; bh=exydtoSr3R4bULzA95T6rznMexFiiJKDUKLRXqVuk7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bssBHY5ecCmObmRlKvg4IlEkR/m0Xko2Sr4TAB3YF5g0wRB1nCV6eRP8mq5aazWrO grZ4MNxL6ROrzzAl1erJW8ftu78jI/3pTda7M0Sf+ARUpUDWkFZHQLExuNvEKOGKxA 4lMtU4s2VaKfXQwJiKZx3E+3IPK/izyKvNMh9hH2zizzKu0UWvBy3rTTrJXVzC5ezW K+C3e1jie+cqybjM/WOGV8T8eYpAggZ1ZvmjJK4abw78u7ka5B3QJFPZx7OzzirYa1 XUnSnbdVutKWryePMUEdbqFgQkDdRLvyYdGiom3tgcq7MJINah+RAAALFwhCMvQeyj jHzbDHBPq0dNw== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana , Johannes Thumshirn Subject: [PATCH v2 3/8] common/btrfs: add a _require_btrfs_no_nodatasum helper Date: Wed, 12 Feb 2025 23:35:01 +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 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. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana --- 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 23:35:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972597 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 3487A262816; Wed, 12 Feb 2025 23:35: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=1739403320; cv=none; b=E71U8Yijk9gAQNouo4ogo7yNv+G6z15lhN9vN0zb2YUhnIJNlFzX7ix2qC0fZe111aO4CoF9ff+qpKMKXzXydtqSMH3x7lzSmiftihId/mOsAVK0b+iu5pjE4yXQIOORonEgi5c5vLx5io44lSqIRj0QBtT2xA71llGKs/i+mFQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739403320; c=relaxed/simple; bh=D/M2bDEIHntUZizcxNtHZprqPr/6J9o7/5tcxL4VRK4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e2GAwekBEC0chP8h18hjd3S25xS+LYPFszPYJdo02vuZIRvsDsCMatjD/Xh4ZbIJNRXMKIMXXMaQfPntUwWKN5gq1zZ8Rq22W5xPRbGs5hfEbx2jrpTxB+igmj8fYIQPCqthWNCvgghOgqYy5Bn0mI4r0oJAtdIXJWIQU936hoU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LGxejPHZ; 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="LGxejPHZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEE7BC4CEDF; Wed, 12 Feb 2025 23:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739403320; bh=D/M2bDEIHntUZizcxNtHZprqPr/6J9o7/5tcxL4VRK4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LGxejPHZFVfuZOGmcbG2Ll+I+76pJ8C/rFKwGBUg4jHf1Y0irEkdLbNnHY59X88zy QauyL5kAOxlmCLWrFI6UCadO4aUHadFbCNtX8dWdjjqfG8YrNWH+4cZ9xyMJeZGApJ uXqOmCi+74GmySuAakKsit20wNyVXzqzbzwnquTnfJun+uo4Fp3YeYvd1D5O3krWrL C3OLYDCLgvNkUKNEXuoOYC1wX6Z07WsAPYctezOYbQRAXsoc15ijR+SYXJCucB30C3 cshsrvMtrgg8c/TINHWnO2y8r6+FYKLWMoa2mZWSA+UavtjWqyKm4r0UtnDdgpE4wT aVFu/4pM2gWgw== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana , Johannes Thumshirn Subject: [PATCH v2 4/8] btrfs/333: skip the test when running with nodatacow or nodatasum Date: Wed, 12 Feb 2025 23:35:02 +0000 Message-ID: <2628714aa1415ca5878bac6414a0eda82d915356.1739403114.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. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana --- 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 23:35:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972598 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 063A8260A46; Wed, 12 Feb 2025 23:35: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=1739403322; cv=none; b=O8HrD22r2kLqvFqcXtcBBN5J/FkbRbBuUaK2A5T3uE+kdbJ8ncRsYCwSETsFSNkGOtYKeVqW73nWBuQx9GFNU+0NdjzB+5er2MhxlUoQNQoXWEt/jvqhDEtV711fJzPMRJy9wtksC88jhUBHdbGYnhYS6Rj/BZGqDtdxQEARsqw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739403322; c=relaxed/simple; bh=KeK7/K+QbR1bp4NC/jH89KpxaVH/+F9qplZtR13OptA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oKJAyXSRgQmQl6WTPoLksyperD4qGKgY8g7zRt1yomLlAonCEXWKPuR5W7QF8IzJHFNuwuLS3FkKC1gGfuGKGeAPeAW3FAZOcvzGRNWET2WTjkTle+FSLFUi9Y0W3GA72N7QbqBqFoFHgsOD33nFu0Fj2t7ujChCiox/L7OlOVg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fDpHWj4+; 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="fDpHWj4+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A6DAC4CEE4; Wed, 12 Feb 2025 23:35:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739403321; bh=KeK7/K+QbR1bp4NC/jH89KpxaVH/+F9qplZtR13OptA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fDpHWj4+/+2GAhIJ//eIpeu3UvnWWvJeL5IwjcF1GTdeGYHfHTVFZo1udk3jfPUen YghUiJKpjRlX7KVCan9rc4dIsKYS91+aaF0w9K06kugXDaYr2enym20Jwv4ym3rnAx SyMmzzKA86qalwEJ7WnJ1OqdDpaG2vbt98/I+sVZ6W8DzLuskNHPEQbdb4ooos9YWO 6/UMZXUwwBx2hISnoFdgfHJAze4kW4NlmRNYlcIs01yxoOqVrcK2k78eVW5JIQGiOK tjwygvUu3jRnuuqshOX+s7o1pSdJsuSthNgX+iE+jC9+Ezlz7/mXzFpzC63dQvlo4e UghYEhw0KPxSg== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH v2 5/8] btrfs/205: skip test when running with nodatasum mount option Date: Wed, 12 Feb 2025 23:35:03 +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. So skip the test if nodatasum is a mount option. Signed-off-by: Filipe Manana Reviewed-by: Johannes Thumshirn --- tests/btrfs/205 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/btrfs/205 b/tests/btrfs/205 index 13a1df8b..a557ab14 100755 --- a/tests/btrfs/205 +++ b/tests/btrfs/205 @@ -24,6 +24,11 @@ _require_xfs_io_command "falloc" "-k" _require_command "$CHATTR_PROG" chattr _require_btrfs_fs_feature "no_holes" _require_btrfs_mkfs_feature "no-holes" +# We want to create a compressed inline extent representing 4K of data for file +# foo1 and then clone it into a file without compression, and since compression +# implies datasum, cloning fails if the destination file has nodatasum. So skip +# the test if nodatasum is present in MOUNT_OPTIONS. +_require_btrfs_no_nodatasum run_tests() { From patchwork Wed Feb 12 23:35:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972599 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 F386C261364; Wed, 12 Feb 2025 23:35: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=1739403323; cv=none; b=NePaGLtBezZN2SUKQRMOa1YzFgo5OPHF7P9hC1C2fF/hk5rk95SQ/2ncAf+UNpgBtxxH2rTK+ZykMK5Na6bVFKAezqkQSyjPjmXpGsctLyoTZndCfABVxgZ4qyehVHAwQ6xWuxQNjoT8Toq0CWVNcY8HsixTs9onYb431Xtn0Ac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739403323; c=relaxed/simple; bh=YAX+qxIcE/XtJa2HS8/EY/sAhnhF6Vp8gg0UUCqZAds=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i+U8pzdfolxd0Qa3NQUvM7k8IWHRQ3YiwR2Utm2ZEjA6RHilCbwadp5d4NkP5SUi17mAzbPGk6qNHAdm8OVeUdl3Kyf3aRn4XBL+kP6hxz/qLQ/R+xvps2YYXYZELGG3xtiiQKbfuD85enczlXusaI5Tygx3SkwOADyS1xiWa7s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Cwo08Gnb; 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="Cwo08Gnb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB150C4CEDF; Wed, 12 Feb 2025 23:35:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739403322; bh=YAX+qxIcE/XtJa2HS8/EY/sAhnhF6Vp8gg0UUCqZAds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cwo08GnbMBsqN0sGFIw3UlvU/cOVZMroAWUfwRvNdCJQnYbRrX2TGbeoZZP2a568l FWed7NfcxcFa3aHW3yTcrpmeZtGvDLBPA4qCiVVXrlt1lMzzpv0c66SIdBxjaTDGeR Sb2Ex4UzYQxsVqJMNl7ExVSVRYh05vRvH4nhXyIwnaGoDyIlrZIIohUSpJu8o9G+IF f1Ajd9bnue2jGpiFAwoM/mFGccgk70uBPwr5CPnehUJR9Ufyy9Tte0+dIJvQSlseK4 ExXZoODeS+L1Ubj/yWMjmppFTsy8zxl4VMOE5ILdkISOdHnKKVXY8OYsbqlljymLtQ hoym9A/Zhi4mg== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana Subject: [PATCH v2 6/8] btrfs: skip tests exercising data corruption and repair when using nodatasum Date: Wed, 12 Feb 2025 23:35:04 +0000 Message-ID: <3933f432a25909190d730f3d8c1cd8b47d899d24.1739403114.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 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 Reviewed-by: Johannes Thumshirn --- 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 23:35:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972600 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 08B90263C67; Wed, 12 Feb 2025 23:35: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=1739403325; cv=none; b=jgeKueQ/wtdIW1f1r4X1bHhhHSQbZQy7IYbSKGm3LZfQDH3FnDWvekiZrUV7SxIK9wLBCr7Qp5GYzbgQtZ5yyDZfsA4bw7vVurQ/DO+fDDqBCuLpIyS2foZeytBrc2K9keuMOTIRr2jnCjWb6iWJvhF6y3UYxMWb00/pF6g4i9k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739403325; c=relaxed/simple; bh=R9zk32eYJmRwZVeXIhnAZ62HN5guLOg9t8RgRLRYI34=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HoDVhWq3B43cvZawysZqGQBmKqGl2m6tCEYsoSmZ6Z6vbPRiNzDhAoJ8A2Sc/we6g3TID2NbPT7T1GtYXHBNak4+5J3gmx7+N4gUg5Y2fqzrWWY9KBtskD+NegnfV5qKCwaHLwTiaAR45GnIQTgx0V5+y9Iz83QwPuq26xBfqGc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UJP6hA8f; 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="UJP6hA8f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57752C4CEE4; Wed, 12 Feb 2025 23:35:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739403324; bh=R9zk32eYJmRwZVeXIhnAZ62HN5guLOg9t8RgRLRYI34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UJP6hA8frAzvY+LT0aFH7/89Yzl4e6xaBqD3BiCslnbPqzPHINi5KVhWzhGmq2XH1 H7JwjGL10fbMnPLly4dkWTItD02WxxUTVHGqpYh/u0UN8PKW5NeQAHEPbSALST3Tzj 45QCi7CZxwyyU/DwxmOW8O7MJVQTOl92xHRWwsXn5dU7NQoHPMU0lNvgY8zVmCXogD Id5T/OEA9qSu/NJBYFzS7Qi3XZo0M9Jw5UdXMwIkM+RBeoUJWa5idyES9OI/8d2BX+ hLNN07xGBn6PUSLSmDGwM/8RhmG1zIyMxkE7twK4KaKTTcO25I5tTxG1GakC6OE69O BmRvnX6GG6bHw== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana , David Sterba Subject: [PATCH v2 7/8] btrfs/281: skip test when running with nodatasum mount option Date: Wed, 12 Feb 2025 23:35:05 +0000 Message-ID: <313bb218f2c32ce565b6b2e3a9adbda6c68d4d41.1739403114.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. Reviewed-by: David Sterba Signed-off-by: Filipe Manana Reviewed-by: Johannes Thumshirn --- 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 23:35:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13972601 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 2C5F325D548; Wed, 12 Feb 2025 23:35:26 +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=1739403326; cv=none; b=R/omQTuL9PT3dYEW856op3S8DgNnl2FAdWock9/Qz1kAcxjkeCLUHgaNbd37Anplgd6jY3HOt/wrX06Cb7NO7Wtourv/rN39Dj6EF5/ojzNtPrmT450p1kue87ry3cV9vkVc66f7nwBZXGFGO8P5iwtAJU10XuEEdyby/X8JgaM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739403326; c=relaxed/simple; bh=g2U64/jen+A/FU39yqHRTgfvxFrRvv9Tg0mJK9PBfV8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DJrIEL9qbjEkGhwXc8kxRlIpQc5+Td+TxLERv/1qqpVSBYwZ0KheQIAezhHxwbbCVOnbng2YR1bFpMKpcHs7UkhXTiHoMfmhalXD+f5aQh8IZl20fiy1slFdVmbHEpvWcq/t3veM/Yayt0eJ6JbzBCHL58/X4psmbcjOqr0aybk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Wo1Qsf5M; 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="Wo1Qsf5M" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E613FC4CEE5; Wed, 12 Feb 2025 23:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739403326; bh=g2U64/jen+A/FU39yqHRTgfvxFrRvv9Tg0mJK9PBfV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wo1Qsf5MkTqAT689eA2yGZ+BP7tD647XWNF3g9VpZwIGexMp2p9RPcIkHZMcNzgh0 9GQLOEZ5M3npeqb6SLn/08GQZw+befQX3tXRY9u6XP2lGQVz4UZLbQcNlnsrLzG3tS kqYR3xkdWctsvkBCBgj1aY5dyVCxsc1PZAm98qYAGtnUxBnnKWzyXA8zZfd2pMdcem t7ZrolEIBhZ61yKVRSB7ZpySTXEKRqfYoWvhHhuEH/FrZf8ybAdebjzPf7xeB9GxJq kStmZhiscVGu8wUsrnPpxr/6Tuf8gY8PRTZEdglwX6b0tctp47+RN3Ad8pqbpG9bK0 MCYHDcNkfydSA== From: fdmanana@kernel.org To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Filipe Manana , David Sterba Subject: [PATCH v2 8/8] btrfs: skip tests that exercise compression property when using nodatasum Date: Wed, 12 Feb 2025 23:35:06 +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. Reviewed-by: David Sterba Signed-off-by: Filipe Manana Reviewed-by: Johannes Thumshirn --- 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