summaryrefslogtreecommitdiff
path: root/common/stdio.c
diff options
context:
space:
mode:
authorGabriel Dalimonte <gabriel.dalimonte@gmail.com>2025-02-17 13:26:45 -0500
committerTom Rini <trini@konsulko.com>2025-03-07 11:50:22 -0600
commit879eee641b6ddd4cd8299cb14803766935536b3e (patch)
tree99292aee365eaf314b875c8f70521137e022a848 /common/stdio.c
parent06159a1465fc97d8d7b72b9bea39a396f6e7057c (diff)
fs: fat: update parent dirs metadata on dentry create/delete
POSIX filesystem functions that create or remove directory entries contain text along the lines of "[function] shall mark for update the last data modification and last file status change timestamps of the parent directory of each file." [1][2][3] The common theme is these timestamp updates occur when a directory entry is added or removed. The create_link() and delete_dentry_link() functions have been changed to update the modification timestamp on the directory where the direntry change occurs. This differs slightly from Linux in the case of rename(), where Linux will not update `new_path`'s parent directory's timestamp if it is replacing an existing file. (via `vfat_add_entry` [4]) The timestamps are not updated if the build configuration does not support RTCs. This is an effort to minimize introducing erratic timestamps where they would go from [current date] -> 2000-01-01 (error timestamp in the FAT driver). I would assume an unchanged timestamp would be more valuable than a default timestamp in these cases. [1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/rename.html [2] https://pubs.opengroup.org/onlinepubs/9799919799/functions/unlink.html [3] https://pubs.opengroup.org/onlinepubs/9799919799/functions/open.html [4] https://elixir.bootlin.com/linux/v6.12.6/source/fs/fat/namei_vfat.c#L682 Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
Diffstat (limited to 'common/stdio.c')
0 files changed, 0 insertions, 0 deletions