From: Alex Zhuravlev Date: Wed, 23 May 2012 07:54:00 +0000 (+0400) Subject: LU-1305 lu: fid_is_acct function X-Git-Tag: 2.2.55~40 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=7f72fee8c31abd37823386a4587fb5de937b7d3f LU-1305 lu: fid_is_acct function a helper introduced in orion for new quota componenent Signed-off-by: Alex Zhuravlev Change-Id: Iee557fbd8f910c49b65e1b66330e6906d6efe975 Reviewed-on: http://review.whamcloud.com/2882 Reviewed-by: Johann Lombardi Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/lustre_fid.h b/lustre/include/lustre_fid.h index 4e6955e..e4c8324 100644 --- a/lustre/include/lustre_fid.h +++ b/lustre/include/lustre_fid.h @@ -128,6 +128,13 @@ static inline void lu_local_obj_fid(struct lu_fid *fid, __u32 oid) fid->f_ver = 0; } +static inline int fid_is_acct(const struct lu_fid *fid) +{ + return fid_seq(fid) == FID_SEQ_LOCAL_FILE && + (fid_oid(fid) == ACCT_USER_OID || + fid_oid(fid) == ACCT_GROUP_OID); +} + enum lu_mgr_type { LUSTRE_SEQ_SERVER, LUSTRE_SEQ_CONTROLLER