Whamcloud - gitweb
LU-17309 llog: set timestamp on llog objects at creation time
To facilitate debugging, this commit introduces the storage of the
creation time (ctime) for llog objects upon creation. Additionally,
the modification time (mtime) will be updated when the catalog is
modified.
- For llog creation, la_ctime/mtime/atime are set within
llog_osd_create().
- For update, there are 2 entries leading to the modification of
llog: 1) direct usage over plain-log?, dt_attr_set() is added with
la_mtime set in llog.c; 2) update through catalog, dt_attr_set() is
added in llog_cat.c
Performance Considerations:
- Catalog modifications are infrequent, minimizing the performance
impact.
- Updating the mtime incurs no additional overhead when new records
are added to an llog file, as the new inode size/ blocks must be
written regardless.
Signed-off-by: Keguang Xu <squalfof@gmail.com>
Change-Id: I13c260cc576e35a811a9d33cacfdd0bdf8492962
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56691
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>