Whamcloud - gitweb
LU-4017 quota: add project inherit attributes
[fs/lustre-release.git] / lustre / include / lustre / lustre_idl.h
index 89b632c..dc1e37c 100644 (file)
@@ -1621,6 +1621,7 @@ enum {
        LUSTRE_TOPDIR_FL = 0x00020000, /* Top of directory hierarchies*/
        LUSTRE_DIRECTIO_FL = 0x00100000, /* Use direct i/o */
        LUSTRE_INLINE_DATA_FL = 0x10000000, /* Inode has inline data. */
+       LUSTRE_PROJINHERIT_FL = 0x20000000, /* Create with parents projid */
 
        /* These flags will not be identical to any EXT4_*_FL counterparts,
         * and only reserved for lustre purpose. Note: these flags might
@@ -1634,6 +1635,10 @@ enum {
        LUSTRE_LMA_FL_MASKS = LUSTRE_ORPHAN_FL,
 };
 
+#ifndef FS_XFLAG_PROJINHERIT
+#define FS_XFLAG_PROJINHERIT   0x00000200      /* create with parents projid */
+#endif
+
 #ifdef __KERNEL__
 /* Convert wire LUSTRE_*_FL to corresponding client local VFS S_* values
  * for the client inode i_flags.  The LUSTRE_*_FL are the Lustre wire
@@ -1649,7 +1654,8 @@ static inline int ll_ext_to_inode_flags(int flags)
 #if defined(S_DIRSYNC)
                 ((flags & LUSTRE_DIRSYNC_FL)   ? S_DIRSYNC   : 0) |
 #endif
-                ((flags & LUSTRE_IMMUTABLE_FL) ? S_IMMUTABLE : 0));
+               ((flags & LUSTRE_IMMUTABLE_FL) ? S_IMMUTABLE : 0) |
+               ((flags & LUSTRE_PROJINHERIT_FL) ? FS_XFLAG_PROJINHERIT : 0));
 }
 
 static inline int ll_inode_to_ext_flags(int iflags)
@@ -1660,7 +1666,8 @@ static inline int ll_inode_to_ext_flags(int iflags)
 #if defined(S_DIRSYNC)
                 ((iflags & S_DIRSYNC)   ? LUSTRE_DIRSYNC_FL   : 0) |
 #endif
-                ((iflags & S_IMMUTABLE) ? LUSTRE_IMMUTABLE_FL : 0));
+               ((iflags & S_IMMUTABLE) ? LUSTRE_IMMUTABLE_FL : 0) |
+               ((iflags & FS_XFLAG_PROJINHERIT) ? LUSTRE_PROJINHERIT_FL : 0));
 }
 #endif