Whamcloud - gitweb
LU-17309 llog: set timestamp on llog objects at creation time 91/56691/7
authorKeguang Xu <squalfof@gmail.com>
Tue, 15 Oct 2024 06:28:58 +0000 (14:28 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Dec 2024 08:16:40 +0000 (08:16 +0000)
commite33d196b937957f257590d823088e0cda388a11e
tree8007b7e13aec5eb5815500989f6c14e7c3667aa6
parent908417ce209f51b8f17475f304bcf5b2bafcb7b8
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>
lustre/obdclass/llog.c
lustre/obdclass/llog_cat.c
lustre/obdclass/llog_osd.c
lustre/tests/sanity.sh