Whamcloud - gitweb
LU-4017 e2fsprogs: add project quota support
[tools/e2fsprogs.git] / lib / ext2fs / ext2_fs.h
index efde7a5..0438720 100644 (file)
@@ -457,6 +457,7 @@ struct ext2_inode_large {
        __u32   i_crtime;       /* File creation time */
        __u32   i_crtime_extra; /* extra File creation time (nsec << 2 | epoch)*/
        __u32   i_version_hi;   /* high 32 bits for 64-bit version */
+       __u32   i_projid;       /* Project ID */
 };
 
 #define i_dir_acl      i_size_high
@@ -467,6 +468,10 @@ struct ext2_inode_large {
                         (EXT2_GOOD_OLD_INODE_SIZE +    \
                          (inode)->i_extra_isize))      \
 
+#define inode_includes(size, field)                    \
+       (size >= (sizeof(((struct ext2_inode_large *)0)->field) + \
+                 offsetof(struct ext2_inode_large, field)))
+
 #if defined(__KERNEL__) || defined(__linux__)
 #define i_reserved1    osd1.linux1.l_i_reserved1
 #define i_frag         osd2.linux2.l_i_frag
@@ -490,6 +495,7 @@ struct ext2_inode_large {
 
 #define inode_uid(inode)       ((inode).i_uid | (inode).osd2.linux2.l_i_uid_high << 16)
 #define inode_gid(inode)       ((inode).i_gid | (inode).osd2.linux2.l_i_gid_high << 16)
+#define inode_projid(inode)    ((inode).i_projid)
 #define ext2fs_set_i_uid_high(inode,x) ((inode).osd2.linux2.l_i_uid_high = (x))
 #define ext2fs_set_i_gid_high(inode,x) ((inode).osd2.linux2.l_i_gid_high = (x))
 
@@ -657,7 +663,12 @@ struct ext2_super_block {
        __u32   s_grp_quota_inum;       /* inode number of group quota file */
        __u32   s_overhead_blocks;      /* overhead blocks/clusters in fs */
        __u32   s_backup_bgs[2];        /* If sparse_super2 enabled */
-       __u32   s_reserved[106];        /* Padding to the end of the block */
+       __u8    s_encrypt_algos[4];     /* Encryption algorithms in use  */
+       __u8    s_encrypt_pw_salt[16];  /* Salt used for string2key algorithm */
+       __u32   s_lpf_ino;              /* Location of the lost+found inode */
+       __u32   s_prj_quota_inum;       /* project quota file inode number */
+       __u32   s_checksum_seed;        /* crc32c(uuid) if csum_seed set */
+       __u32   s_reserved[98];         /* Padding to the end of the block */
        __u32   s_checksum;             /* crc32c(superblock) */
 };