Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH v2] btrfs/333: require scratch before checking encoded reads
@ 2026-09-02  3:33 Prabhakar Pujeri
  2026-09-02  5:15 ` Qu Wenruo
  0 siblings, 1 reply; 2+ messages in thread
From: Prabhakar Pujeri @ 2026-09-02  3:33 UTC (permalink / raw)
  To: fstests
  Cc: Prabhakar Pujeri, Zorro Lang, Anand Jain, Filipe Manana,
	Qu Wenruo, linux-btrfs

_require_btrfs_iouring_encoded_read() formats and mounts the scratch
device while checking for encoded-read support.  Without a configured
scratch device, callers therefore fail inside the helper before any
scratch requirement is checked.

Add _require_scratch at the top of the helper so that all of its
callers skip cleanly when no scratch device is present.

Changes in v2:
- Move _require_scratch into _require_btrfs_iouring_encoded_read() so
  the requirement is enforced for all callers of the helper, per Qu
  Wenruo's suggestion.  Revert the v1 caller-side change in btrfs/333.
- Cc Qu Wenruo.

v1: https://lore.kernel.org/fstests/20260831104200.2269-1-prabhakar.pujeri@dell.com/

Signed-off-by: Prabhakar Pujeri <prabhakar.pujeri@dell.com>
---
 common/btrfs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/btrfs b/common/btrfs
index a75fbf1..ccac862 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -1055,6 +1055,7 @@ _require_btrfs_iouring_encoded_read()
 	local tmpfile
 	local ret
 
+	_require_scratch
 	_require_command src/btrfs_encoded_read
 
 	_scratch_mkfs &> /dev/null
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-02  5:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02  3:33 [PATCH v2] btrfs/333: require scratch before checking encoded reads Prabhakar Pujeri
2026-09-02  5:15 ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox