DISP_u16(inode, i_extra_isize);
DISP_u16(inode, i_padding);
+ DISP_u32(inode, i_projid);
DISP_u32(inode, i_addr[ofs]); /* Pointers to data blocks */
DISP_u32(inode, i_addr[ofs + 1]); /* Pointers to data blocks */
if (f & cpu_to_le32(F2FS_FEATURE_EXTRA_ATTR)) {
MSG(0, "%s", " extra attribute");
}
+ if (f & cpu_to_le32(F2FS_FEATURE_PRJQUOTA)) {
+ MSG(0, "%s", " project quota");
+ }
MSG(0, "\n");
MSG(0, "Info: superblock encrypt level = %d, salt = ",
sb->encryption_level);
#define F2FS_FEATURE_BLKZONED 0x0002
#define F2FS_FEATURE_ATOMIC_WRITE 0x0004
#define F2FS_FEATURE_EXTRA_ATTR 0x0008
+#define F2FS_FEATURE_PRJQUOTA 0x0010
#define MAX_VOLUME_NAME 512
(offsetof(struct f2fs_inode, i_extra_end) - \
offsetof(struct f2fs_inode, i_extra_isize)) \
+#define F2FS_DEF_PROJID 0 /* default project ID */
+
#define MAX_INLINE_DATA(node) (sizeof(__le32) * \
(DEF_ADDRS_PER_INODE_INLINE_XATTR - \
get_extra_isize(node) - \
struct {
__le16 i_extra_isize; /* extra inode attribute size */
__le16 i_padding; /* padding */
+ __le32 i_projid; /* project id */
__le32 i_extra_end[0]; /* for attribute size calculation */
};
__le32 i_addr[DEF_ADDRS_PER_INODE]; /* Pointers to data blocks */
cpu_to_le16(F2FS_TOTAL_EXTRA_ATTR_SIZE);
}
+ if (c.feature & cpu_to_le32(F2FS_FEATURE_PRJQUOTA))
+ raw_node->i.i_projid = cpu_to_le32(F2FS_DEF_PROJID);
+
data_blk_nor = get_sb(main_blkaddr) +
c.cur_seg[CURSEG_HOT_DATA] * c.blks_per_seg;
raw_node->i.i_addr[get_extra_isize(raw_node)] = cpu_to_le32(data_blk_nor);
c.feature |= cpu_to_le32(F2FS_FEATURE_ENCRYPT);
} else if (!strcmp(features, "extra_attr")) {
c.feature |= cpu_to_le32(F2FS_FEATURE_EXTRA_ATTR);
+ } else if (!strcmp(features, "project_quota")) {
+ c.feature |= cpu_to_le32(F2FS_FEATURE_PRJQUOTA);
} else {
MSG(0, "Error: Wrong features\n");
mkfs_usage();
}
}
+ if (!(c.feature & cpu_to_le32(F2FS_FEATURE_EXTRA_ATTR))) {
+ if (c.feature & cpu_to_le32(F2FS_FEATURE_PRJQUOTA)) {
+ MSG(0, "\tInfo: project quota feature should always been"
+ "enabled with extra attr feature\n");
+ exit(1);
+ }
+ }
+
if (optind >= argc) {
MSG(0, "\tError: Device not specified\n");
mkfs_usage();