From patchwork Tue Dec 30 20:51:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1112 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=1767127946; bh=Y2Ohj6tWke7cpCz4+WTl2oOndb2hdydhLNRyC5Lf6zQ=; 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=Za//Rz25cIyfgydVKgeKnce8gC7N8RhIdyM5knguS/AcyjocNxUx+x2oY4FEDN7Pg sBdqOUyOdSLA7yWPjYw1oznlrE9ZN2vMor3Tv/5a1nXxJhdakdQIwd29R+DRcbiTAQ zCTNl6AY//EOja+GrxJkBhTCECWiuax6DqkRnMvFEALB+tFgKG15/eGG62gv66KUvh JqihYXK9dMi7OGS+dM02llA8B0oCXAgbWHPYG7/ESugMJ1cgFU5ps6Jbvfq5WDxD8R CXLBrMWJidJFXADIpkhAAZR9toIVQ8ekYmUJ+fAlhuLxxM+JX5FWvv8bP61NF/1i2F GbTulNnpC+/tQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8947A68F7D for ; Tue, 30 Dec 2025 13:52:26 -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 vUDknH_fVnem for ; Tue, 30 Dec 2025 13:52:26 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767127946; bh=Y2Ohj6tWke7cpCz4+WTl2oOndb2hdydhLNRyC5Lf6zQ=; 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=Za//Rz25cIyfgydVKgeKnce8gC7N8RhIdyM5knguS/AcyjocNxUx+x2oY4FEDN7Pg sBdqOUyOdSLA7yWPjYw1oznlrE9ZN2vMor3Tv/5a1nXxJhdakdQIwd29R+DRcbiTAQ zCTNl6AY//EOja+GrxJkBhTCECWiuax6DqkRnMvFEALB+tFgKG15/eGG62gv66KUvh JqihYXK9dMi7OGS+dM02llA8B0oCXAgbWHPYG7/ESugMJ1cgFU5ps6Jbvfq5WDxD8R CXLBrMWJidJFXADIpkhAAZR9toIVQ8ekYmUJ+fAlhuLxxM+JX5FWvv8bP61NF/1i2F GbTulNnpC+/tQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7908E68C06 for ; Tue, 30 Dec 2025 13:52:26 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767127944; bh=G/3+Y+Q5+bVmSodKy+ZUsyRqNUAAvJ3a1u69ErPlVxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kWLYVYpwWEgOTgJvBRo0q9V6gTHpZO+zmBnU9e0tJkrc/vzSWI+SkWrB4+FqGPCpB W8Y22E68FD0KxdKtzUjrTxbNt3kVkzrn+jbBxjo7EgEFIiyfJ3UawHy79Seui4jDuW 4dirtEC7Kd3GiF48NdAy7r+qehoG46IcINJK7GmjTqV2izT7xdqoqkLMBrZk9Y5+IC nASM6eDNAARhqrN7EMoPNG9YlNEScHLhbyqoIOS11I4Cvo2jfGKRFKfBdqqt6XmROn JIh8TTpNSmMQQhnOSb1oVFg8BbXK/vRsUO/Bd6u2NiENCbCmkYrQCrot2xMVczxKlt f+HTEfN7m3grg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EDECB68C06; Tue, 30 Dec 2025 13:52:24 -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 jV9CaFiOrnlV; Tue, 30 Dec 2025 13:52:24 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767127939; bh=y9TqtVA41a5cbfYinndL7CeCy65p9THUZ0vmWs1vgZg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T2HBwX5IUkI4bxW84TIp+xUQkEQl8DmyHDbTXNYnRjWGVDR4giv/IJkd0NIex3dt4 yo3wmmOO13KSqeI5PjGbtry/dBQAuQ5tXSnK9clSSVrQ65aorPuhiQDGtB9bQzj0zt ZPMEmqXyflN92I5nnr6UUW5mFl2qF5cI1P58jHQTxPFicjtKgFWWv0REV153XvXlZk w1b0MlAxupzfKaCiP0I57SlRWzga8L+z/TdiG2hO/QB7SZP4H49WGZqRyjL2/42Kk5 tAuUlkpW0dBdOqpOl0sLBVCKI1oUfme8IUHtT10u3X3ucUsWlh9UDJDur9QBiU32WU FD0RgNwvhrOnw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 52C1764C8A; Tue, 30 Dec 2025 13:52:19 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 30 Dec 2025 13:51:40 -0700 Message-ID: <20251230205157.3383926-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251230205157.3383926-1-sjg@u-boot.org> References: <20251230205157.3383926-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: CES4WSRCSNCRLPAVQDIE2UAJGXSMQFGV X-Message-ID-Hash: CES4WSRCSNCRLPAVQDIE2UAJGXSMQFGV 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 03/14] linux: ext4l: Export ext4 functions for U-Boot interface 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 Remove static from ext4_create(), ext4_mkdir(), ext4_symlink(), and ext4_rename2() and add declarations in ext4.h to allow calling them from ext4l interface code. Co-developed-by: Claude Signed-off-by: Simon Glass --- fs/ext4l/ext4.h | 9 +++++++++ fs/ext4l/namei.c | 18 +++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/fs/ext4l/ext4.h b/fs/ext4l/ext4.h index 1c2d5beb121..669d5522f27 100644 --- a/fs/ext4l/ext4.h +++ b/fs/ext4l/ext4.h @@ -3137,6 +3137,15 @@ extern int ext4_ext_migrate(struct inode *); extern int ext4_ind_migrate(struct inode *inode); /* namei.c */ +extern int ext4_create(struct mnt_idmap *idmap, struct inode *dir, + struct dentry *dentry, umode_t mode, bool excl); +extern struct dentry *ext4_mkdir(struct mnt_idmap *idmap, struct inode *dir, + struct dentry *dentry, umode_t mode); +extern int ext4_symlink(struct mnt_idmap *idmap, struct inode *dir, + struct dentry *dentry, const char *symname); +extern int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir, + struct dentry *old_dentry, struct inode *new_dir, + struct dentry *new_dentry, unsigned int flags); extern int ext4_init_new_dir(handle_t *handle, struct inode *dir, struct inode *inode); extern int ext4_dirblock_csum_verify(struct inode *inode, diff --git a/fs/ext4l/namei.c b/fs/ext4l/namei.c index 53c48d12918..bede355d497 100644 --- a/fs/ext4l/namei.c +++ b/fs/ext4l/namei.c @@ -2792,8 +2792,8 @@ static int ext4_add_nondir(handle_t *handle, * If the create succeeds, we fill in the inode information * with d_instantiate(). */ -static int ext4_create(struct mnt_idmap *idmap, struct inode *dir, - struct dentry *dentry, umode_t mode, bool excl) +int ext4_create(struct mnt_idmap *idmap, struct inode *dir, + struct dentry *dentry, umode_t mode, bool excl) { handle_t *handle; struct inode *inode; @@ -2974,8 +2974,8 @@ out: return err; } -static struct dentry *ext4_mkdir(struct mnt_idmap *idmap, struct inode *dir, - struct dentry *dentry, umode_t mode) +struct dentry *ext4_mkdir(struct mnt_idmap *idmap, struct inode *dir, + struct dentry *dentry, umode_t mode) { handle_t *handle; struct inode *inode; @@ -3340,8 +3340,8 @@ out: return err; } -static int ext4_symlink(struct mnt_idmap *idmap, struct inode *dir, - struct dentry *dentry, const char *symname) +int ext4_symlink(struct mnt_idmap *idmap, struct inode *dir, + struct dentry *dentry, const char *symname) { handle_t *handle; struct inode *inode; @@ -3773,9 +3773,9 @@ retry: * while new_{dentry,inode) refers to the destination dentry/inode * This comes from rename(const char *oldpath, const char *newpath) */ -static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir, - struct dentry *old_dentry, struct inode *new_dir, - struct dentry *new_dentry, unsigned int flags) +int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir, + struct dentry *old_dentry, struct inode *new_dir, + struct dentry *new_dentry, unsigned int flags) { handle_t *handle = NULL; struct ext4_renament old = {