From: Simon Glass <simon.glass@canonical.com> The ktime_get_real_seconds() stub returns 0, causing deleted inodes to have zero i_dtime. This causes fsck to complain about deleted inodes with zero deletion time. Instead, use the boot-relative time in seconds. While not a real wall-clock timestamp, it provides a non-zero value that satisfies filesystem-consistency checks. Future work can improve on this, perhaps using an on-board RTC. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index c5eddca3aef..5c66e35662d 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -402,8 +402,8 @@ struct buffer_head *sb_getblk(struct super_block *sb, sector_t block); #define sb_find_get_block(sb, block) ((struct buffer_head *)NULL) #define sync_dirty_buffer(bh) submit_bh(REQ_OP_WRITE, bh) -/* Time functions */ -#define ktime_get_real_seconds() (0) +/* Time functions - use boot-relative time for timestamps */ +#define ktime_get_real_seconds() (get_timer(0) / 1000) #define time_before32(a, b) (0) /* Inode operations - iget_locked and new_inode are in interface.c */ -- 2.43.0