From patchwork Tue Jan 20 23:43:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1719 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=1768952707; bh=SK8Fs4ZldbgT1dHTYvbaaoy7I8SaPHzKZmJjNZBmFs8=; 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=gY1WrgDqRNPhibw5dJ6y6IKm64b/rPX9MFoalxtfqhtHOh4wa3umunskHKaUiSxVq vZMGKhRUGqNUbJU6RAduDiAuUSVw6nwI6v4i1GPixSyZAisHVlpr3jZPCKoiGh2U/B ZtYtPWbl+y4CQ5E9W1lINImtZOS7O15FV4KvlVX3xjHevrQTrgit0YhdAZkK1wrbRa f0pu0fX31/zVBoGZyaj+nVx95uVePHTBaUjJofKuuDAMP7xtOuNydZLHq9B6656+Nm KQELvgxXXIEOhF4ZD7rUbDkD2LuIwJrXtlIoatqCoUNBQ5hX4iagEVrlBmVG7+e3Y7 ZjuOw8GCCjZDQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D2A4569555 for ; Tue, 20 Jan 2026 16:45:07 -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 u8XS_PMRIT7G for ; Tue, 20 Jan 2026 16:45:07 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952707; bh=SK8Fs4ZldbgT1dHTYvbaaoy7I8SaPHzKZmJjNZBmFs8=; 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=gY1WrgDqRNPhibw5dJ6y6IKm64b/rPX9MFoalxtfqhtHOh4wa3umunskHKaUiSxVq vZMGKhRUGqNUbJU6RAduDiAuUSVw6nwI6v4i1GPixSyZAisHVlpr3jZPCKoiGh2U/B ZtYtPWbl+y4CQ5E9W1lINImtZOS7O15FV4KvlVX3xjHevrQTrgit0YhdAZkK1wrbRa f0pu0fX31/zVBoGZyaj+nVx95uVePHTBaUjJofKuuDAMP7xtOuNydZLHq9B6656+Nm KQELvgxXXIEOhF4ZD7rUbDkD2LuIwJrXtlIoatqCoUNBQ5hX4iagEVrlBmVG7+e3Y7 ZjuOw8GCCjZDQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BFB1A695A6 for ; Tue, 20 Jan 2026 16:45:07 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952705; bh=IhT/P30AesaOzhpqmX0LtC+lPAkWx8e5CRbkH1JQxi0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bu+h9wxegYuo3grQxIZmV3/ogg7GfAGdczWXO9kbOW8dxdVMlbORmnUiuPonXOamU OeOug88RkvUHJJKdYE6pwe2RL1sqnhmlvPzotUnMb8AeEvXeI6Nk4EbGNl2liT0pvk P03O9cn42zFAV3ChSPY+eZxdDUN5u0721olq3aAgPZmIAkvRXeFi5ZhIcMz/vDXO9r K/dRBgNRkVSkCDnQWw8ckCy386QKbr6a3VUMD2IiU/YW1E1v4uV++xpHwyCZZ2qyfE tUlpVQJX5/z9VHvz+H3ATaGIX24tsxJ2bbPCGYmML5i8ENJFaldXkU4EddMu8JijZJ OIlggiweC5x9A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8AADC695A6; Tue, 20 Jan 2026 16:45:05 -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 kMfRip7Zx0UF; Tue, 20 Jan 2026 16:45:05 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952699; bh=kJXpzTWz/htFNzw4x9FXMgc4h2OwBnIcicAIXHNcCm0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XpsptxidNobse03O/qwmnRHDoORTvZpDr8W80G6lB8a4KKparAXsQZiSAEKl56fEf Egiiy/dob3MWEk29PMG3a2RQNfBbGlbcq9cUx7RWdZho11tybdFZ4KdIybyblTQeDD 4zLr4kGJiLS7+u5uu4iB1Brkgm4a8HTTJC+0p+WlYbPxbRbZ8gClUQjnNGQyH+tk4c C+d/cqZjxsbVO+lhSmASX9j6waKMYmo8Oxf4X9Gzjmlc9Fu0UbH50Cy1bbpbEnLUu+ VkurwLVajw+tb5bzzQfohwKRunFFDckOfo1OkJ4VTz8e29s1G9oZUQURAFAtHQIIeY 7qx03JHJ1pMxQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 6F34869555; Tue, 20 Jan 2026 16:44:59 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 20 Jan 2026 16:43:30 -0700 Message-ID: <20260120234344.495605-11-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: 5CO3LUKFF4JWWDHYMP47K3JMGCSIFWS5 X-Message-ID-Hash: 5CO3LUKFF4JWWDHYMP47K3JMGCSIFWS5 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 10/17] ext4l: Move get_block_t typedef to linux/fs.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 the get_block_t callback typedef to linux/fs.h where it belongs in the Linux kernel header hierarchy. This type is used for filesystem block mapping callbacks. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 8 +------- include/linux/fs.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index b44126a733a..8a2d18ccaf5 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -327,13 +327,7 @@ BUFFER_FNS(OwnsData, ownsdata) #define BH_Cached (BH_JBDPrivateStart + 2) BUFFER_FNS(Cached, cached) -/* Forward declare for get_block_t */ -struct inode; -struct buffer_head; - -/* get_block_t - block mapping callback */ -typedef int (get_block_t)(struct inode *inode, sector_t iblock, - struct buffer_head *bh_result, int create); +/* get_block_t is in linux/fs.h */ /* crc32c - from linux/crc32c.h */ #include diff --git a/include/linux/fs.h b/include/linux/fs.h index 5f1d702bab4..a6ad309e5c8 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -321,6 +321,18 @@ enum { /* Maximum file size for large files */ #define MAX_LFS_FILESIZE ((loff_t)LLONG_MAX) +/** + * get_block_t - block mapping callback type + * @inode: inode to map blocks for + * @iblock: logical block number + * @bh_result: buffer head to fill with mapping + * @create: whether to create new blocks + * + * Callback function type for filesystem block mapping. + */ +typedef int (get_block_t)(struct inode *inode, sector_t iblock, + struct buffer_head *bh_result, int create); + /** * struct fstrim_range - fstrim ioctl argument * @start: first byte to trim