From patchwork Tue Jan 20 23:43:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1718 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952701; bh=NqP5ieX4dp+2gGHG8M8KtpYEUJIunNGeYKO/jKZpNFQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WZcQ0lg+7Vp4NhX5cpWPCUz8hIY0Aw3/fTqI4F/WCQxzinv4K7dWwJRXLVxe5Lm8c 3D0pyCjoooJ864d8kePObkruzPiGAmdHuZejTLSTXKpwXgDi88bLzgXK3wD/RyJHAw JGbfYzjcVlbBMw7Ffym7jnXLNKcBZHqw2OkZbIACXwUn8fWuU5Cr5oUpSy6rIorcLo CqeIWUgrOzrE8DNbviE5wBtnwsVBKKJFpjQgrOvOs1llLvEX69WzCbvec4mRABZOoj CeFEK+6EPF7UoiHzkhCVCuGeBhWtI0IGoCQj37gUz6QblXmuKgV6dtLRMH79jhsauD +OXAG6qoBYl1g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1E47369597 for ; Tue, 20 Jan 2026 16:45:01 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 7Cvib870ys3n for ; Tue, 20 Jan 2026 16:45:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952701; bh=NqP5ieX4dp+2gGHG8M8KtpYEUJIunNGeYKO/jKZpNFQ=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=WZcQ0lg+7Vp4NhX5cpWPCUz8hIY0Aw3/fTqI4F/WCQxzinv4K7dWwJRXLVxe5Lm8c 3D0pyCjoooJ864d8kePObkruzPiGAmdHuZejTLSTXKpwXgDi88bLzgXK3wD/RyJHAw JGbfYzjcVlbBMw7Ffym7jnXLNKcBZHqw2OkZbIACXwUn8fWuU5Cr5oUpSy6rIorcLo CqeIWUgrOzrE8DNbviE5wBtnwsVBKKJFpjQgrOvOs1llLvEX69WzCbvec4mRABZOoj CeFEK+6EPF7UoiHzkhCVCuGeBhWtI0IGoCQj37gUz6QblXmuKgV6dtLRMH79jhsauD +OXAG6qoBYl1g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0ABF6695A6 for ; Tue, 20 Jan 2026 16:45:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952699; bh=3FB/vhGocCPG/dheCbKFlGGbp93SvOKZnLbsLbshXdU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hrbfAPvrEp6hvjkKyVNv/+Bx8E0Y7ORHh31jN/QYHaZeISq8+qlYs/TMre5Rwf3CN x0x3N+DTc1q/+d6LzPeOiVj6uCrp8CUYEwEI4uHkVy+uduxk1XW3HAU+DBgNafsum4 57V7xlafrTn2PeV8VtqYMCCUQf/tDCkUk32hAyclxxpQIT2RtP6Itx+xflt5DiDmaf w4e20+6IPf3b/r7Y82mtpwaEHWs/SwoKGV8IGxiVfd2C+ivJmFOYy/H0afGq0ywnbQ qlasirmXJKDt1xJEecu3fdWrltGpK/owa77qak1Yf1deiqc6YlNS+qPUZ8SSm8Aswz PcNQ97hsTA1mQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2711569597; Tue, 20 Jan 2026 16:44:59 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 8whUwV1RdDaX; Tue, 20 Jan 2026 16:44:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952695; bh=22jSGEGjEJC7R4itmmvgNoFX7yeGQ5M4MZwrELTM6KE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OUksnKK6mua69pZID0gg1Bn39uyVQy+2OisBgxYINXZWurS157KKbo3cTnwgI/3YC LdQ8Ji/mj1ncu+b7hNXwh+9W3/dijwb+6hFAZnbbcIWBbVClmFwCbHLvZrwplZx9FI m/ixp488zf+QJmiJiT/lvOIj1VUPkQH8tdVq1U9i6Z/7SHktst+RYiErE9HyXZjfYx yk/iVMIQ7qsKVjgOacDXr7u0CnKtydB0YQ8krXERAt8RR0t99trpU2CA9AB7UtsOY9 ASYd7abSrnlPYbkEhI5uxQmQetxeOjSs67xD4kB4KeUYRx1Rbwn3J2G1vqgDejYrj+ OCqA3Tc681ezg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id CE27569555; Tue, 20 Jan 2026 16:44:54 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 20 Jan 2026 16:43:29 -0700 Message-ID: <20260120234344.495605-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260120234344.495605-1-sjg@u-boot.org> References: <20260120234344.495605-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: D372F27YVHXLQKCW4PX4DYLAISQ4UQLL X-Message-ID-Hash: D372F27YVHXLQKCW4PX4DYLAISQ4UQLL X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 09/17] ext4l: Move block device atomic write stubs to linux/blkdev.h List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Move bdev_can_atomic_write(), bdev_atomic_write_unit_max_bytes(), and bdev_atomic_write_unit_min_bytes() stubs to linux/blkdev.h where they belong in the Linux kernel header hierarchy. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 5 +---- include/linux/blkdev.h | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index b44939bfe5a..b44126a733a 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1181,10 +1181,7 @@ void free_page(unsigned long addr); void *fs_dax_get_by_bdev(struct block_device *bdev, u64 *start, u64 *len, void *holder); -/* Block device atomic write stubs */ -#define bdev_can_atomic_write(bdev) ({ (void)(bdev); 0; }) -#define bdev_atomic_write_unit_max_bytes(bdev) ({ (void)(bdev); (unsigned int)0; }) -#define bdev_atomic_write_unit_min_bytes(bdev) ({ (void)(bdev); 0UL; }) +/* Block device atomic write stubs are in linux/blkdev.h */ /* Superblock blocksize - declaration for stub.c */ int sb_set_blocksize(struct super_block *sb, int size); diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index f1a4cc12d3c..eaf2984c08f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -50,4 +50,9 @@ struct blk_plug { */ #define blk_finish_plug(plug) do { (void)(plug); } while (0) +/* Block device atomic write support - not supported in U-Boot */ +#define bdev_can_atomic_write(bdev) ({ (void)(bdev); 0; }) +#define bdev_atomic_write_unit_max_bytes(bdev) ({ (void)(bdev); (unsigned int)0; }) +#define bdev_atomic_write_unit_min_bytes(bdev) ({ (void)(bdev); 0UL; }) + #endif /* _LINUX_BLKDEV_H */