X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre_quota.h;h=c1941d767aa3e1d2ffa6d14e57ca3c8a2ce205cd;hb=0e67cdb9bd986e1b4dfa915ae8c2e7c2687f3df2;hp=ee0ca22b719445791c57051a5df5f1983cdb71a0;hpb=d750891e478804bc495ffa075d771d1816369958;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre_quota.h b/lustre/include/lustre_quota.h index ee0ca22..c1941d7 100644 --- a/lustre/include/lustre_quota.h +++ b/lustre/include/lustre_quota.h @@ -797,6 +797,48 @@ extern quota_interface_t lmv_quota_interface; "admin_quotafile_v2.grp" /** group admin quotafile */\ } +/* + * Definitions of structures for vfsv0 quota format + * Source linux/fs/quota/quotaio_v2.h + * + * The following definitions are normally found in private kernel headers. + * However, some sites build Lustre against kernel development headers rather + * than than full kernel source, so we provide them here for compatibility. + */ +#ifdef __KERNEL__ +# if !defined(HAVE_QUOTAIO_H) && !defined(HAVE_FS_QUOTA_QUOTAIO_H) && \ + !defined(HAVE_FS_QUOTAIO_H) + +#include +#include + +#define V2_INITQMAGICS {\ + 0xd9c01f11, /* USRQUOTA */\ + 0xd9c01927 /* GRPQUOTA */\ +} + +/* Header with type and version specific information */ +struct v2_disk_dqinfo { + __le32 dqi_bgrace; /* Time before block soft limit becomes hard limit */ + __le32 dqi_igrace; /* Time before inode soft limit becomes hard limit */ + __le32 dqi_flags; /* Flags for quotafile (DQF_*) */ + __le32 dqi_blocks; /* Number of blocks in file */ + __le32 dqi_free_blk; /* Number of first free block in the list */ + __le32 dqi_free_entry; /* Number of block with at least one free entry */ +}; + +/* First generic header */ +struct v2_disk_dqheader { + __le32 dqh_magic; /* Magic number identifying file */ + __le32 dqh_version; /* File version */ +}; +#define V2_DQINFOOFF sizeof(struct v2_disk_dqheader) /* Offset of info header in file */ +#define QT_TREEOFF 1 /* Offset of tree in file in blocks */ +#define V2_DQTREEOFF QT_TREEOFF + +# endif /* !defined(HAVE_QUOTAIO_V1_H) ... */ +#endif /* __KERNEL__ */ + /** @} quota */ #endif /* _LUSTRE_QUOTA_H */