From patchwork Mon Jan 19 21:48:32 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1664 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=1768859374; bh=FgfDxMYhf6TZQiF2RyVEerJWc8bAyS9Y3OncwHeCAvY=; 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=m66x+u18k/PZKUSA9i2X2/A3esJJ69tOyqJLslAjzPLXs+Ik7MyrUjn3jVTz5TcA2 onWL9XtIlofHSKIeEdv45OUXbCAzSl8gMxTmFx6B/imt1JwRxj7Yxf0QTG9dvg8OIT ajY/YFZIPEIAZy+WhfKTV0QKiKU5/PdBCzk9ERJtFKupQwAgebXAar8nGhNRTnXuXL sghcqqg0yQG2i/E9cE7dLYzY4U19RXAAzaNLBuHZ335a0vbupcLDJcZdDQdxGHD25i Op+iNCrAIzvjGXTDXBTX98CIo6LgiqCRnq2kNv2sbGYBWIn9FhpSHw53d6E1IiOCGc e9IsVJisQvCAw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D8BFE69536 for ; Mon, 19 Jan 2026 14:49:34 -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 yxKF0Zg0mVlu for ; Mon, 19 Jan 2026 14:49:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859374; bh=FgfDxMYhf6TZQiF2RyVEerJWc8bAyS9Y3OncwHeCAvY=; 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=m66x+u18k/PZKUSA9i2X2/A3esJJ69tOyqJLslAjzPLXs+Ik7MyrUjn3jVTz5TcA2 onWL9XtIlofHSKIeEdv45OUXbCAzSl8gMxTmFx6B/imt1JwRxj7Yxf0QTG9dvg8OIT ajY/YFZIPEIAZy+WhfKTV0QKiKU5/PdBCzk9ERJtFKupQwAgebXAar8nGhNRTnXuXL sghcqqg0yQG2i/E9cE7dLYzY4U19RXAAzaNLBuHZ335a0vbupcLDJcZdDQdxGHD25i Op+iNCrAIzvjGXTDXBTX98CIo6LgiqCRnq2kNv2sbGYBWIn9FhpSHw53d6E1IiOCGc e9IsVJisQvCAw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C6C6769533 for ; Mon, 19 Jan 2026 14:49:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859372; bh=JIeVnddmUabzpxmxWc9Ygci7fCJLanzDAew9A1gP5BQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NIErijttDk+BzqLTGfFURu6zEAL/op2JCbL2RosnMVltK3WDRHpATcLKqo2BvEwRM vYmyt1Gn1OPEw8SWm8M2Yl53ZIvTcoUiZsh+6ka1wMoovzLHSilHPTsFAEyO9OQwYi e5aW8wSb7eeOrPzQBTCJZjK0cSdnbcz1u5dPZBMwlLVtJLqD6He1yK4M3KMk8ZD0Qc f+9vny/wAgkRHRbp8k9TkBA+S6f7axMkfSo0byRaYHV87RY96V6H/+H+Th/KbDMGAz VQLZR5PXxFzqGC6Z5VHqSQZAPvjMvsXKaDZcOJs5VPcE2jn4mM+jyNOoNZpqLfk2ux TYY53eeauG9Zg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BBA4369533; Mon, 19 Jan 2026 14:49:32 -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 7447d8ElCTXj; Mon, 19 Jan 2026 14:49:32 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768859367; bh=0uAocTSn5U5YbcKYemNLf9NLMAXbzosz6J999bVnDgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NdjIXb6Y0sGY3Yjg3MNTMSg3a9AgHhhFsjevXKLxSjPMsvbnkjJPqHI5P+sQD04xQ b9wd534bhfQvsqbZQMcsldB4WHkBeoXMJ0DGGsavXiSxLToVZ6kLzGb0tHO5nP8RA1 IBkzEuvmCXyVnMj2kT+PcDTP2fUag5bgwqYYKxNEZw0ll3cYvmp7KZOI0S6lc/oONd NbzW1o3gnSEufrNhCCmXlPvjmgFj6gGyNWzym3+sCJLjEHJOFupgfa+YvVZVcON2CA 0hG1qoAr7z7FhbYr0AeeZfeiTK5JchLh1QHczd7khjaF9dcKqV3jAu45H+PHoMxKnz vWcXzFFhrW5Ew== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id AD7D26951A; Mon, 19 Jan 2026 14:49:27 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 19 Jan 2026 14:48:32 -0700 Message-ID: <20260119214846.3087611-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119214846.3087611-1-sjg@u-boot.org> References: <20260119214846.3087611-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: KXIMSVJ2O6Y75HTRRGVJGPU654WQZPXJ X-Message-ID-Hash: KXIMSVJ2O6Y75HTRRGVJGPU654WQZPXJ 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 07/16] ext4l: Move fstrim_range 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 struct fstrim_range to include/linux/fs.h where it belongs in the Linux kernel header hierarchy. This structure is used for FITRIM ioctl. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 7 +------ include/linux/fs.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 55a06d01996..91d432d391d 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -395,12 +395,7 @@ typedef long long qsize_t; /* mnt_idmap - use linux/mnt_idmapping.h */ #include -/* fstrim_range - stub */ -struct fstrim_range { - u64 start; - u64 len; - u64 minlen; -}; +/* fstrim_range is in linux/fs.h */ /* rw_semaphore - defined in linux/rwsem.h, include it */ #include diff --git a/include/linux/fs.h b/include/linux/fs.h index 75e4bd3e951..1b0059ca1a7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -305,4 +305,18 @@ enum { #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) +/** + * struct fstrim_range - fstrim ioctl argument + * @start: first byte to trim + * @len: number of bytes to trim + * @minlen: minimum extent length + * + * Used for FITRIM ioctl to trim unused blocks. + */ +struct fstrim_range { + u64 start; + u64 len; + u64 minlen; +}; + #endif /* _LINUX_FS_H */