hfsplus: report create_date to kstat.btime
Subsystems (2)
PATCH 1/1 hfsplus: report create_date to kstat.btime
The create_date field of inode in hfsplus is corresponding to kstat.btime and could be reported in statx.
Signed-off-by Chung-Chiang Cheng <[email protected]>
--- fs/hfsplus/inode.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/hfsplus/inode.c +5 -0
@@ -278,6 +278,11 @@ int hfsplus_getattr(struct user_namespace *mnt_userns, const struct path *path,struct inode *inode =d_inode (path->dentry);struct hfsplus_inode_info *hip =HFSPLUS_I (inode); +if (request_mask &STATX_BTIME ) { + stat->result_mask |=STATX_BTIME ; + stat->btime =hfsp_mt2ut (hip->create_date); + } +if (inode->i_flags &S_APPEND ) stat->attributes |=STATX_ATTR_APPEND ;if (inode->i_flags &S_IMMUTABLE )
Signature · 1 line
2.25.1
From: Chung-Chiang Cheng <[email protected]>
There's no HFSPLUS maintainer now. Could anyone help to review this patch or give feedback?
Quoted 28 lines · Chung-Chiang Cheng
The
create_datefield of inode in hfsplus is corresponding to kstat.btime and could be reported in statx.Signed-off-by Chung-Chiang Cheng <[email protected]>--- fs/hfsplus/inode.c | 5 +++++ 1 file changed, 5 insertions(+)fs/hfsplus/inode.c +5
-1@@ -278,6 +278,11 @@ int hfsplus_getattr(struct user_namespace *mnt_userns, const struct path *path,struct inode *inode =d_inode (path->dentry);struct hfsplus_inode_info *hip =HFSPLUS_I (inode); +if (request_mask &STATX_BTIME ) { + stat->result_mask |=STATX_BTIME ; + stat->btime =hfsp_mt2ut (hip->create_date); + } +if (inode->i_flags &S_APPEND ) stat->attributes |=STATX_ATTR_APPEND ;if (inode->i_flags &S_IMMUTABLE ) --2.25.1
Quoted 31 lines · Chung-Chiang Cheng
The
create_datefield of inode in hfsplus is corresponding to kstat.btime and could be reported in statx.Signed-off-by Chung-Chiang Cheng <[email protected]>---
fs/hfsplus/inode.c| 5 +++++1 file changed, 5 insertions(+)fs/hfsplus/inode.c +5
-0@@ -278,6 +278,11 @@ int hfsplus_getattr(struct user_namespace *mnt_userns, const struct path *path,struct inode *inode =d_inode (path->dentry);struct hfsplus_inode_info *hip =HFSPLUS_I (inode); +if (request_mask &STATX_BTIME ) { + stat->result_mask |=STATX_BTIME ; + stat->btime =hfsp_mt2ut (hip->create_date); + } +if (inode->i_flags &S_APPEND ) stat->attributes |=STATX_ATTR_APPEND ;if (inode->i_flags &S_IMMUTABLE )Signature · 1 line
2.25.1
Looks good for me.
Reviewed-by Viacheslav Dubeyko <[email protected]>
Thanks,
Slava.