[lustre-devel] [PATCH 24/24] lustre: llite: fix stat attributes_mask
James Simmons
jsimmons at infradead.org
Mon Sep 5 18:55:37 PDT 2022
From: Sebastien Buisson <sbuisson at ddn.com>
Fix stat attributes_mask to return STATX_ATTR_ENCRYPTED whenever it is
possible. Also fix sanityn test_106c to expect at least the 0x30 flag
for attributes_mask.
WC-bug-id: https://jira.whamcloud.com/browse/LU-16085
Lustre-commit: 0e48653c27eacad29 ("LU-16085 llite: fix stat attributes_mask")
Signed-off-by: Sebastien Buisson <sbuisson at ddn.com>
Reviewed-on: https://review.whamcloud.com/48208
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: James Simmons <jsimmons at infradead.org>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/llite/file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/lustre/llite/file.c b/fs/lustre/llite/file.c
index 115ee69..5394cce 100644
--- a/fs/lustre/llite/file.c
+++ b/fs/lustre/llite/file.c
@@ -5268,6 +5268,9 @@ int ll_getattr_dentry(struct dentry *de, struct kstat *stat, u32 request_mask,
}
stat->attributes_mask = STATX_ATTR_IMMUTABLE | STATX_ATTR_APPEND;
+#ifdef CONFIG_FS_ENCRYPTION
+ stat->attributes_mask |= STATX_ATTR_ENCRYPTED;
+#endif
stat->attributes |= ll_inode_to_ext_flags(inode->i_flags);
stat->result_mask &= request_mask;
--
1.8.3.1
More information about the lustre-devel
mailing list