From patchwork Wed Jan 14 22:56:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1527 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=1768431556; bh=xEJf8KG+TUh8W3Pvy4Y3SVCM5QxIXABtNhepExCnDL8=; 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=O+7b6qp6mvGkF3DFXY7ZjTDS4a+jGvaoth29MiKJXRF8dk6NRxvrqt8DRVUNX+l5g FLzncTjC8wVtHn4ZfPTqw8SQPwSdazYfLSG9xNbwcy7o8dd4Y141wWmII3y+4UnVzN Ib4WilS8JG6H/T4Mm6PE5mAnPuLKhvKYqjP3LySkHGeg1JpU5zXeyXs4CMrSC2x/Rk fkk6tlbhdHItVk4UoyF6uK4TgqpSpxDy9ukrdtcUy9BUL8/cmQRfzNc9yBvesmYA9H iVb1/ot7Lol6n9KIqRru5RSYhppdcO4Rry6ZlklUTOaJ4/jhjquC3Ro5jXouMkAMaN TX7UDC17ce4jA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 241F46913F for ; Wed, 14 Jan 2026 15:59:16 -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 FfcebM2um0Nm for ; Wed, 14 Jan 2026 15:59:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431556; bh=xEJf8KG+TUh8W3Pvy4Y3SVCM5QxIXABtNhepExCnDL8=; 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=O+7b6qp6mvGkF3DFXY7ZjTDS4a+jGvaoth29MiKJXRF8dk6NRxvrqt8DRVUNX+l5g FLzncTjC8wVtHn4ZfPTqw8SQPwSdazYfLSG9xNbwcy7o8dd4Y141wWmII3y+4UnVzN Ib4WilS8JG6H/T4Mm6PE5mAnPuLKhvKYqjP3LySkHGeg1JpU5zXeyXs4CMrSC2x/Rk fkk6tlbhdHItVk4UoyF6uK4TgqpSpxDy9ukrdtcUy9BUL8/cmQRfzNc9yBvesmYA9H iVb1/ot7Lol6n9KIqRru5RSYhppdcO4Rry6ZlklUTOaJ4/jhjquC3Ro5jXouMkAMaN TX7UDC17ce4jA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0F5EA69360 for ; Wed, 14 Jan 2026 15:59:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431553; bh=m7YWiaglgUNr3oUlTth1I5wP9DZB578b/iUci+aUHDw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Iek609Z2oEv+khSp8/4RG6Rg76pnqMBzzqogZ2FdBJ//0mjEAgGUWrt2cUnkTDRlY J2cYosp735cxZq0iG3900QWx2bSkJMVPSJx9lg9B1jk0iwxuNjz4gRSDNc/BhOVZMX y/ndpppX4K4Pj5+kT8lqvp4FYw+F9E1rixQnX7n2G8tr5qCXLxTp08R6mndMglqkig /e0sks8TbgsS3mE8r4P9n3Emj3sBkq1A/bt9bGMaEhmglqTSNopfSE5t2tQf0AUkk2 G0CbCSvLsaFOdScLGvQI/n0FDnLIYy8Tmyf5mOdZvVxHSuPO+mVaD4aswIUpAXaKd/ xOkEFcRCnvETA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A72F569360; Wed, 14 Jan 2026 15:59:13 -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 W5JwXn9YpWv2; Wed, 14 Jan 2026 15:59:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431549; bh=IGzw7Ff2B+NmVKbmK8rHAxdpE1RE9TDwNHGpZIDfDME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=blkjvOQwuw6Drr/zpiKaKlIDUP29d/xzHGFpUIDFNW1FzYknuaHa6uzKN/He1iYY7 xrWTyOfVQpGLSzKwcJrXr+kKF03yCHxQqw0VT2vULvjVECMttjWG6JjuAAYMLKBKD4 kB2YBAwuvB/11zawhZWO1Fy8ygKqhDJCFnJAOJi/jJg6tl6ADa4PL6YPAOiUDBH9Gj njVhfIPj/JykdZZYIK+A7rohRfBoffcqsozd8f2msYvgjvhsJ5G29f2E9JH0Nrn9zH fVPkNE1xbsImTVw/+ZSs/qJ0nBXHX48UcFmXnDeroxPko/mDDQ8jN4guQTBRCigpa5 m5cJ6zQkYPehA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id B18E26913F; Wed, 14 Jan 2026 15:59:08 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 14 Jan 2026 15:56:23 -0700 Message-ID: <20260114225635.3407989-34-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260114225635.3407989-1-sjg@u-boot.org> References: <20260114225635.3407989-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: CLZUAFV562OL5WVJVSL6ZJTLUZJ4IPVG X-Message-ID-Hash: CLZUAFV562OL5WVJVSL6ZJTLUZJ4IPVG 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 33/34] ext4l: Move SB_* superblock flags 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 common superblock flags from ext4_uboot.h to linux/fs.h: - SB_RDONLY: read-only mount flag - SB_POSIXACL: POSIX ACL support flag - SB_LAZYTIME: lazy time updates flag - SB_I_VERSION: inode version update flag - SB_INLINECRYPT: inline encryption flag - SB_ACTIVE: superblock active flag - SB_SILENT: silent mount errors flag - SB_FREEZE_*: filesystem freeze level constants Keep SB_I_CGROUPWB and SB_I_ALLOW_HSM as U-Boot stubs since these are not supported. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 26 +++++++------------------- include/linux/fs.h | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 4baf9410012..87cc561538e 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -396,11 +396,7 @@ void iput(struct inode *inode); /* _RET_IP_ - return instruction pointer */ #define _RET_IP_ ((unsigned long)__builtin_return_address(0)) -/* SB_FREEZE constants */ -#define SB_FREEZE_WRITE 1 -#define SB_FREEZE_PAGEFAULT 2 -#define SB_FREEZE_FS 3 -#define SB_FREEZE_COMPLETE 4 +/* SB_FREEZE_* constants are in linux/fs.h */ /* sb_writers stub */ struct sb_writers { @@ -525,9 +521,7 @@ struct fstrim_range { /* block_device is defined in linux/fs.h */ -/* Superblock flags */ -#define SB_RDONLY (1 << 0) -#define SB_I_VERSION (1 << 26) /* Update inode version */ +/* SB_RDONLY, SB_I_VERSION, etc. superblock flags are in linux/fs.h */ /* UUID type */ typedef struct { @@ -593,9 +587,7 @@ static inline int bdev_read_only(struct block_device *bdev) /* Inode dirty state flags */ #define I_DIRTY_TIME (1 << 3) -/* Superblock flags */ -#define SB_LAZYTIME (1 << 25) - +/* SB_LAZYTIME is in linux/fs.h */ /* ATTR_* iattr valid flags are in linux/fs.h */ /* STATX flags and attributes */ @@ -1683,8 +1675,7 @@ static inline void end_buffer_read_sync(struct buffer_head *bh, int uptodate) } #define REQ_OP_READ 0 -/* Superblock flags */ -#define SB_ACTIVE (1 << 30) +/* SB_ACTIVE is in linux/fs.h */ /* Part stat - not used in U-Boot. Note: sectors[X] is passed as second arg */ #define STAT_WRITE 0 @@ -1893,12 +1884,9 @@ struct fs_parse_result { /* I/O priority classes */ #define IOPRIO_CLASS_BE 2 -/* Superblock flags */ -#define SB_INLINECRYPT (1 << 27) -#define SB_SILENT (1 << 15) -#define SB_POSIXACL (1 << 16) -#define SB_I_CGROUPWB 0 -#define SB_I_ALLOW_HSM 0 +/* SB_INLINECRYPT, SB_SILENT, SB_POSIXACL are in linux/fs.h */ +#define SB_I_CGROUPWB 0 /* Not supported in U-Boot */ +#define SB_I_ALLOW_HSM 0 /* Not supported in U-Boot */ /* Block open flags */ #define BLK_OPEN_READ (1 << 0) diff --git a/include/linux/fs.h b/include/linux/fs.h index ba4463cfc79..7393fd0d316 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -208,6 +208,21 @@ static inline void inode_init_once(struct inode *inode) #define RENAME_EXCHANGE (1 << 1) #define RENAME_WHITEOUT (1 << 2) +/* Superblock flags */ +#define SB_RDONLY (1 << 0) /* Read-only mount */ +#define SB_POSIXACL (1 << 16) /* POSIX ACL support */ +#define SB_LAZYTIME (1 << 25) /* Lazy time updates */ +#define SB_I_VERSION (1 << 26) /* Update inode version */ +#define SB_INLINECRYPT (1 << 27) /* Inline encryption */ +#define SB_ACTIVE (1 << 30) /* Superblock is active */ +#define SB_SILENT (1 << 15) /* Silent mount errors */ + +/* Superblock freeze levels */ +#define SB_FREEZE_WRITE 1 +#define SB_FREEZE_PAGEFAULT 2 +#define SB_FREEZE_FS 3 +#define SB_FREEZE_COMPLETE 4 + /* fallocate() flags */ #define FALLOC_FL_KEEP_SIZE 0x01 #define FALLOC_FL_PUNCH_HOLE 0x02