X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fllite%2Fdir.c;fp=lustre%2Fllite%2Fdir.c;h=8e1a1fb3da8fee7603676c6429e408780ae1c9e6;hb=f0ab3ac6d6e31472c20ef538b799b96a512087f7;hp=342c65f1083c6a12d0a652493643196da2d5a2ad;hpb=f96186ec4fca196838d64e336aeba6d6d57481d5;p=fs%2Flustre-release.git diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 342c65f..8e1a1fb 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -2004,6 +2004,20 @@ out_rmdir: stx.stx_dev_minor = MINOR(inode->i_sb->s_dev); stx.stx_mask |= STATX_BASIC_STATS | STATX_BTIME; + stx.stx_attributes_mask = STATX_ATTR_IMMUTABLE | + STATX_ATTR_APPEND; +#ifdef HAVE_LUSTRE_CRYPTO + stx.stx_attributes_mask |= STATX_ATTR_ENCRYPTED; +#endif + if (body->mbo_valid & OBD_MD_FLFLAGS) { + stx.stx_attributes |= body->mbo_flags; + /* if Lustre specific LUSTRE_ENCRYPT_FL flag is + * set, also set ext4 equivalent to please statx + */ + if (body->mbo_flags & LUSTRE_ENCRYPT_FL) + stx.stx_attributes |= STATX_ATTR_ENCRYPTED; + } + /* For a striped directory, the size and blocks returned * from MDT is not correct. * The size and blocks are aggregated by client across