Hi Heinrich,

On 2026-10-12T14:00:39, Heinrich Schuchardt
<[email protected]> wrote:
> fs: ext4: print change date in directory listing
>
> Declare FS_CAP_DATE in the ext4 fstype_info entry so that fs_ls_generic()
> displays the modification date alongside the file size:

>
>  4096 2024-03-15 09:30 filename.txt

The subject says 'change date' but the body says 'modification date'.
For ext4 these are different fields: i_ctime is the inode change time
and i_mtime is the modification time, as you explain in patch 5. The
code uses mtime, so please can you say 'modification date' in the
subject too? Also, the example does not match the output.
fs_ls_generic() prints ' %8lld ', so the size is padded to eight
columns.

>
>  4096 2024-03-15 09:30 filename.txt
>
> Signed-off-by: Heinrich Schuchardt <[email protected]>
>
> fs/fs.c | 3 +++
>  1 file changed, 3 insertions(+)

> diff --git a/fs/fs.c b/fs/fs.c
> @@ -261,6 +261,9 @@ static struct fstype_info fstypes[] = {
> +#if !IS_ENABLED(CONFIG_XPL_BUILD)
> +             .caps = FS_CAP_DATE,
> +#endif

At this point in the series ext4fs_readdir() still does:

    rtc_to_tm(fdiro.inode.mtime, &dent->change_time);

Without le32_to_cpu(), this patch prints garbage dates on big-endian
machines until patch 4. It might be worth moving le32_to_cpu() fix
into this patch, or into one before it, so that the data is correct
before it is shown?

In any case:

Reviewed-by: Simon Glass <[email protected]>

Regards,
Simon

Reply via email to