mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-19 14:34:16 +00:00
Add inode crtime creation time
Add an inode creation time field. It's created for all new inodes. It's visible to stat_more. setattr_more can set it during restore. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -37,6 +37,7 @@ static struct stat_more_field inode_fields[] = {
|
||||
INODE_FIELD(data_version),
|
||||
INODE_FIELD(online_blocks),
|
||||
INODE_FIELD(offline_blocks),
|
||||
{ .name = "crtime", .offset = INODE_FIELD_OFF(crtime_sec) },
|
||||
{ NULL, }
|
||||
};
|
||||
|
||||
@@ -60,6 +61,9 @@ static void print_inode_field(void *st, size_t off)
|
||||
case INODE_FIELD_OFF(offline_blocks):
|
||||
printf("%llu", stm->offline_blocks);
|
||||
break;
|
||||
case INODE_FIELD_OFF(crtime_sec):
|
||||
printf("%llu.%09u", stm->crtime_sec, stm->crtime_nsec);
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user