Add includes for the new header files (blk_types.h, jiffies.h,
percpu_counter.h, spinlock.h) to jbd2.h so it can be included
standalone.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add stub headers to support ext4l filesystem compilation:
New headers:
- bit_spinlock.h: bit-based spinlock stubs
- blkdev.h: block device structures and operations
- buffer_head.h: buffer head management with state functions
- crc32c.h: CRC32C checksum stub
- fs.h: filesystem structures (super_block, inode operations)
- journal-head.h: journal buffer head structure
- mutex.h: mutex stubs
Updates to existing headers:
- compat.h: add rcu_head callback structure
- jbd2.h: add wait.h and init.h includes for types
- sched.h: add current task stub
- workqueue.h: fix flush_work macro warning
These provide the minimal Linux kernel interfaces needed for
ext4 code to compile in U-Boot's single-threaded environment.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Copy include/linux/jbd2.h from Linux v6.18. This header defines the
JBD2 journaling layer interface used by ext4.
Series-to: concept
Cover-letter:
ext4l: Begin an implementation of ext4 based on Linux
U-Boot has long had a solid implementation of ext4. Support for writing
and basic journaling was added as well.
However, there are some missing features. For example, some distros
enable metadata checksums which are not supported. There also also other
features such as fast commit and special feature for small files which
are not currently available.
Linux has the canonical implementation of ext4, so one approach would be
to plumb that code into U-Boot. It is not a small undertaking, since the
existing linux/compat.h has only a small fraction of the required
features.
As a start towards this effort, bring in the entire Linux code,
unmodified.
Note: There are 1000s of checkpatch checks and warnings, plus over 100
errors. These have been left along to reduce the source delta.
END
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>