X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Fuapi%2Flinux%2Flustre%2Flustre_user.h;h=a2456910a376ca273ab7208a2319f39fd6be6307;hb=adc1bbbf20e0a8a53274aa4590ed0935f954d1bc;hp=9297f0d0c57d4793396a7ef8150a8c4f67c7ae22;hpb=01d34a6b3b2e34f7414f627e4f87993322dafa78;p=fs%2Flustre-release.git diff --git a/lustre/include/uapi/linux/lustre/lustre_user.h b/lustre/include/uapi/linux/lustre/lustre_user.h index 9297f0d..a245691 100644 --- a/lustre/include/uapi/linux/lustre/lustre_user.h +++ b/lustre/include/uapi/linux/lustre/lustre_user.h @@ -633,6 +633,7 @@ struct ll_ioc_lease_id { #define LL_IOC_PCC_DETACH _IOW('f', 252, struct lu_pcc_detach) #define LL_IOC_PCC_DETACH_BY_FID _IOW('f', 252, struct lu_pcc_detach_fid) #define LL_IOC_PCC_STATE _IOR('f', 252, struct lu_pcc_state) +#define LL_IOC_PROJECT _IOW('f', 253, struct lu_project) #ifndef FS_IOC_FSGETXATTR /* @@ -931,12 +932,13 @@ static inline __u16 mirror_id_of(__u32 id) * on-disk data for lcm_flags. Valid if lcm_magic is LOV_MAGIC_COMP_V1. */ enum lov_comp_md_flags { - /* the least 2 bits are used by FLR to record file state */ - LCM_FL_NONE = 0, - LCM_FL_RDONLY = 1, - LCM_FL_WRITE_PENDING = 2, - LCM_FL_SYNC_PENDING = 3, - LCM_FL_FLR_MASK = 0x3, + /* the least 4 bits are used by FLR to record file state */ + LCM_FL_NONE = 0x0, + LCM_FL_RDONLY = 0x1, + LCM_FL_WRITE_PENDING = 0x2, + LCM_FL_SYNC_PENDING = 0x3, + LCM_FL_PCC_RDONLY = 0x8, + LCM_FL_FLR_MASK = 0xB, }; struct lov_comp_md_v1 { @@ -1004,7 +1006,7 @@ static __attribute__((unused)) const char *mdt_hash_name[] = { "crush", }; -#define LMV_HASH_TYPE_DEFAULT LMV_HASH_TYPE_FNV_1A_64 +#define LMV_HASH_TYPE_DEFAULT LMV_HASH_TYPE_CRUSH /* Right now only the lower part(0-16bits) of lmv_hash_type is being used, * and the higher part will be the flag to indicate the status of object, @@ -1019,6 +1021,9 @@ static inline bool lmv_is_known_hash_type(__u32 type) (type & LMV_HASH_TYPE_MASK) == LMV_HASH_TYPE_CRUSH; } +/* fixed layout, such directories won't split automatically */ +/* NB, update LMV_HASH_FLAG_KNOWN when adding new flag */ +#define LMV_HASH_FLAG_FIXED 0x02000000 #define LMV_HASH_FLAG_MERGE 0x04000000 #define LMV_HASH_FLAG_SPLIT 0x08000000 @@ -1033,6 +1038,8 @@ static inline bool lmv_is_known_hash_type(__u32 type) #define LMV_HASH_FLAG_LAYOUT_CHANGE \ (LMV_HASH_FLAG_MIGRATION | LMV_HASH_FLAG_SPLIT | LMV_HASH_FLAG_MERGE) +#define LMV_HASH_FLAG_KNOWN 0xfe000000 + /* both SPLIT and MIGRATION are set for directory split */ static inline bool lmv_hash_is_splitting(__u32 hash) { @@ -1274,6 +1281,8 @@ static inline __u64 lustre_stoqb(__kernel_size_t space) #define LUSTRE_Q_SETQUOTAPOOL 0x800010 /* set user pool quota */ #define LUSTRE_Q_GETINFOPOOL 0x800011 /* get pool quota info */ #define LUSTRE_Q_SETINFOPOOL 0x800012 /* set pool quota info */ +#define LUSTRE_Q_GETDEFAULT_POOL 0x800013 /* get default pool quota*/ +#define LUSTRE_Q_SETDEFAULT_POOL 0x800014 /* set default pool quota */ /* In the current Lustre implementation, the grace time is either the time * or the timestamp to be used after some quota ID exceeds the soft limt, * 48 bits should be enough, its high 16 bits can be used as quota flags. @@ -1303,7 +1312,9 @@ static inline __u64 lustre_stoqb(__kernel_size_t space) (cmd == LUSTRE_Q_GETQUOTAPOOL || \ cmd == LUSTRE_Q_SETQUOTAPOOL || \ cmd == LUSTRE_Q_SETINFOPOOL || \ - cmd == LUSTRE_Q_GETINFOPOOL) + cmd == LUSTRE_Q_GETINFOPOOL || \ + cmd == LUSTRE_Q_SETDEFAULT_POOL || \ + cmd == LUSTRE_Q_GETDEFAULT_POOL) #define ALLQUOTA 255 /* set all quota */ static inline const char *qtype_name(int qtype) @@ -1563,7 +1574,7 @@ enum changelog_rec_type { CL_RESYNC = 22, /* FLR: file was resync-ed */ CL_GETXATTR = 23, CL_DN_OPEN = 24, /* denied open */ - CL_LAST + CL_LAST, }; static inline const char *changelog_type2str(int type) { @@ -2665,6 +2676,21 @@ struct lu_pcc_state { char pccs_path[PATH_MAX]; }; +enum lu_project_type { + LU_PROJECT_NONE = 0, + LU_PROJECT_SET, + LU_PROJECT_GET, + LU_PROJECT_MAX +}; + +struct lu_project { + __u32 project_type; /* enum lu_project_type */ + __u32 project_id; + __u32 project_xflags; + __u32 project_reserved; + char project_name[NAME_MAX + 1]; +}; + struct fid_array { __u32 fa_nr; /* make header's size equal lu_fid */