orangefs: report attributes_mask and attributes for statx
Subsystems (2)
Martin Brandenburg
reviewerPATCH 1/1 orangefs: report attributes_mask and attributes for statx
Reported-by Becky Ligon <[email protected]>
Signed-off-by Martin Brandenburg <[email protected]>
--- fs/orangefs/inode.c | 7 +++++++ 1 file changed, 7 insertions(+)
fs/orangefs/inode.c +7 -0
@@ -268,6 +268,13 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,else stat->result_mask =STATX_BASIC_STATS & ~STATX_SIZE ; + + stat->attributes_mask =STATX_ATTR_IMMUTABLE | +STATX_ATTR_APPEND ; +if (inode->i_flags &S_IMMUTABLE ) + stat->attributes |=STATX_ATTR_IMMUTABLE ; +if (inode->i_flags &S_APPEND ) + stat->attributes |=STATX_ATTR_APPEND ; }return ret; }
Signature · 1 line
2.14.3
Hi Martin,
Quoted 3 lines · Martin Brandenburg
Reported-by Becky Ligon <[email protected]>Signed-off-by Martin Brandenburg <[email protected]>
Probably some commit message would help understand others(like me who are new at this) what this patch is about. I could not follow your patch until I read about statx by (
git log --grep=STATX_ATTR_IMMUTABLE)
Thanks for your help!!
Quoted 23 lines
--- fs/orangefs/inode.c | 7 +++++++ 1 file changed, 7 insertions(+)fs/orangefs/inode.c +7
-0@@ -268,6 +268,13 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,else stat->result_mask =STATX_BASIC_STATS & ~STATX_SIZE ; + + stat->attributes_mask =STATX_ATTR_IMMUTABLE | +STATX_ATTR_APPEND ; +if (inode->i_flags &S_IMMUTABLE ) + stat->attributes |=STATX_ATTR_IMMUTABLE ; +if (inode->i_flags &S_APPEND ) + stat->attributes |=STATX_ATTR_APPEND ; }return ret; }
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.