X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Fobd_support.h;h=e8a99d54a387e38810a6bca59965c333cb42339c;hb=28be31137cd22223113e461f74098c92ba6d71e4;hp=d4b35854c4218191047cbe4324ce32bbb9ceed44;hpb=f2bf564e691ea8f64843f5c77ae1a8bd60f1b70b;p=fs%2Flustre-release.git diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index d4b3585..e8a99d5 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -965,12 +965,14 @@ do { \ static inline int lma_to_lustre_flags(__u32 lma_flags) { - return (lma_flags & LMAI_ORPHAN) ? LUSTRE_ORPHAN_FL : 0; + return (((lma_flags & LMAI_ORPHAN) ? LUSTRE_ORPHAN_FL : 0) | + ((lma_flags & LMAI_ENCRYPT) ? LUSTRE_ENCRYPT_FL : 0)); } static inline int lustre_to_lma_flags(__u32 la_flags) { - return (la_flags & LUSTRE_ORPHAN_FL) ? LMAI_ORPHAN : 0; + return (((la_flags & LUSTRE_ORPHAN_FL) ? LMAI_ORPHAN : 0) | + ((la_flags & LUSTRE_ENCRYPT_FL) ? LMAI_ENCRYPT : 0)); } /* Convert wire LUSTRE_*_FL to corresponding client local VFS S_* values @@ -986,6 +988,9 @@ static inline int ll_ext_to_inode_flags(int flags) ((flags & LUSTRE_NOATIME_FL) ? S_NOATIME : 0) | ((flags & LUSTRE_APPEND_FL) ? S_APPEND : 0) | ((flags & LUSTRE_DIRSYNC_FL) ? S_DIRSYNC : 0) | +#if defined(S_ENCRYPTED) + ((flags & LUSTRE_ENCRYPT_FL) ? S_ENCRYPTED : 0) | +#endif ((flags & LUSTRE_IMMUTABLE_FL) ? S_IMMUTABLE : 0)); } @@ -995,6 +1000,9 @@ static inline int ll_inode_to_ext_flags(int iflags) ((iflags & S_NOATIME) ? LUSTRE_NOATIME_FL : 0) | ((iflags & S_APPEND) ? LUSTRE_APPEND_FL : 0) | ((iflags & S_DIRSYNC) ? LUSTRE_DIRSYNC_FL : 0) | +#if defined(S_ENCRYPTED) + ((iflags & S_ENCRYPTED) ? LUSTRE_ENCRYPT_FL : 0) | +#endif ((iflags & S_IMMUTABLE) ? LUSTRE_IMMUTABLE_FL : 0)); }