1
0
Fork 0
alistair23-linux/fs/erofs
Gao Xiang 52e3a55bc2 erofs: derive atime instead of leaving it empty
commit d3938ee23e upstream.

EROFS has _only one_ ondisk timestamp (ctime is currently
documented and recorded, we might also record mtime instead
with a new compat feature if needed) for each extended inode
since EROFS isn't mainly for archival purposes so no need to
keep all timestamps on disk especially for Android scenarios
due to security concerns. Also, romfs/cramfs don't have their
own on-disk timestamp, and squashfs only records mtime instead.

Let's also derive access time from ondisk timestamp rather than
leaving it empty, and if mtime/atime for each file are really
needed for specific scenarios as well, we can also use xattrs
to record them then.

Link: https://lore.kernel.org/r/20201031195102.21221-1-hsiangkao@aol.com
[ Gao Xiang: It'd be better to backport for user-friendly concern. ]
Fixes: 431339ba90 ("staging: erofs: add inode operations")
Cc: stable <stable@vger.kernel.org> # 4.19+
Reported-by: nl6720 <nl6720@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-18 19:20:28 +01:00
..
Kconfig erofs: kill all erofs specific fault injection 2019-09-05 20:10:08 +02:00
Makefile
compress.h
data.c erofs: fix erofs_get_meta_page locking due to a cleanup 2019-10-01 04:54:33 +08:00
decompressor.c erofs: fix out-of-bound read for shifted uncompressed block 2020-02-11 04:35:23 -08:00
dir.c erofs: rename errln/infoln/debugln to erofs_{err, info, dbg} 2019-09-05 20:10:09 +02:00
erofs_fs.h erofs: update erofs_fs.h comments 2019-09-05 20:10:07 +02:00
inode.c erofs: derive atime instead of leaving it empty 2020-11-18 19:20:28 +01:00
internal.h erofs: rename errln/infoln/debugln to erofs_{err, info, dbg} 2019-09-05 20:10:09 +02:00
namei.c erofs: rename errln/infoln/debugln to erofs_{err, info, dbg} 2019-09-05 20:10:09 +02:00
super.c erofs: fix return value check in erofs_read_superblock() 2019-10-01 04:53:50 +08:00
tagptr.h
utils.c erofs: correct the remaining shrink objects 2020-04-17 10:50:16 +02:00
xattr.c erofs: avoid duplicated permission check for "trusted." xattrs 2020-11-01 12:01:04 +01:00
xattr.h erofs: use erofs_inode naming 2019-09-05 20:10:07 +02:00
zdata.c erofs: fix mis-inplace determination related with noio chain 2019-10-01 04:54:45 +08:00
zdata.h erofs: fix partially uninitialized misuse in z_erofs_onlinepage_fixup 2020-06-30 15:37:07 -04:00
zmap.c erofs: rename errln/infoln/debugln to erofs_{err, info, dbg} 2019-09-05 20:10:09 +02:00
zpvec.h erofs: remove all likely/unlikely annotations 2019-08-30 09:02:02 +02:00